2.1. Name, Age and Annual Income - Java

in java •  9 years ago  (edited)

Starting out with Java: From control structures through objects

Chapter 2

Programming Challenges

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

1. Name, age, and annual income 


Write a program that declares the following: 

    •  a String variable named name 

    •  an int variable named age 

    •  a double variable named annualPay 

Store your age, name, and desired annual income as literals in these variables. The program should display these values on the screen in a manner 

similar to the following: 


My name is Joe Mahoney, my age is 26 and 

I hope to earn $100000.0 per year.


Gaddis, Tony (2015-05-29). Starting Out with Java: From Control Structures through Objects (6th Edition) (Page 105). Pearson. Kindle Edition. 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Bitcoin Address - 12uPbtoTBgxKG3ppxC2NSJYmmr5qipsbds

Ether Address - 0xb6f7D2d2127a56aF7D55CdBD7d327439A9005abF

Change tip address - kakradetome.tip.me

email - kakradetome@gmail.com


Thanks :)

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!