Question: Using basic java o o o o o 2. VariablePractice.java -- In the main method of your second program, do the following: Declare a short
Using basic java

o o o o o 2. VariablePractice.java -- In the main method of your second program, do the following: Declare a short variable in one statement on one line and initialize it on the next line in another statement. (2 statements) Declare a long variable and initialize it in a single, one-line statement. (1 statement) Declare two boolean variables in a single statement. Initialize each on separate lines, in separate statements. (3 statements) Declare two char variables and initialize both, all in a single one-line statement. (1 statement) Declare two double variables and initialize them to 5.5 and 9.7. (Number of statements may vary) Declare two int variables and initialize them to 22 and 85. (Number of statements may vary) Declare two String variables and initialize them to "carpe" and "diem". (Number of statements may vary) Write println statements with string concatenation expressions to produce the following output. This should only require the variables you declared in the previous three steps, with the exception of the last line of output, where you will need to concatenate some elements not contained within the variables. (4 statements): diem229.7carpe 15.2carpe 90.5carpe2285 carpe, diem_8522 o o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
