Question: Using Basic Java 1. UsingVariables.java -- In the main method of your first program, do the following: Declare the following variables, each in a separate,

Using Basic Java

Using Basic Java 1. UsingVariables.java -- In the main method of your

1. UsingVariables.java -- In the main method of your first program, do the following: Declare the following variables, each in a separate, one-line statement (4 statements, total): o Name : Type: byteVar byte boolVar | boolean fVarl float fVar2 float O For each of the four variables, initialize each in a separate, one-line statement. For the float variables, you will need to put an "f" after the number. For example: 2.2f (4 statements, total) Write println statements (4 statements, total) to announce the current values of each (use your variables in String concatenation): The current value of byteVar is 5 The current value of boolVar is true The current value of fVarl is 3.7 The current value of fVar2 is 5.5 o Change the values of each variable, and repeat the previous step by announcing the new values of those variables (8 statements, total). o Swap the values of the float variables (fVarl and fVar2) without using literals. (Number of statements may vary) Write println statements to announce their new values after the swap. (2 statements, total) O

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!