Write a program that defines an integer variable named age and a doublevariab le named wei ght. Store your age and weight as literals in the variables.The program should display these values on the screen in a manner similar tothe following:Program OutputMy age is 26 and my weight is 168.5 pounds.(Feel free to lie to the computer about your age and weight. It will never know!)

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question

Write a program that defines an integer variable named age and a double
variab le named wei ght. Store your age and weight as literals in the variables.
The program should display these values on the screen in a manner similar to
the following:
Program Output
My age is 26 and my weight is 168.5 pounds.
(Feel free to lie to the computer about your age and weight. It will never know!)

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Name constants and Literal values
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT