Question: Java Help Write a program called DataTypeDemo YourLastName (where YourLastName is replaced by your last name) that does the following: Declare and initialize one
Java Help
Write a program called "DataTypeDemo YourLastName" (where YourLastName is replaced by your last name) that does the following:
- Declare and initialize one variable of each data type to an appropriate value:
- int
- double
- float
- boolean
- short
- long
- byte
- char
- Print out the variable as part of a witty statement or line using a System.out.println( ) statement. For example:
- I hope I score at least a 9.9 on this assignment (where 9.9 is a double variable).
- Next, create three constants, a double, int and boolean type. Use good programming conventions for the name as discussed in the eBook and the weekly video.
- Again, print out the constant variables as part of a witty statement or line. For example:
- This assignment was tons of fun: true (where true is a boolean constant variable initialized to true)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
