Question: Write java statements to do the following: Declare a String constant university Name with SHSU as its initial value. i. ii. Declare a double variable
Write java statements to do the following: Declare a String constant university Name with "SHSU" as its initial value. i. ii. Declare a double variable named price; ii. Assign the value 2.99 to the variable price; iv. Declare an integer variable called count with an initial value of o; v. Declare a character variable named letterGrade; vi. Assign the character A to the variable letterGrade; vii. Declare a boolean variable named done; vili. Declare a Scanner variable named keyboardinput; create a Scanner object for the keyboard input and store the reference in the variable keyboardinput; ix. Among all above types, which are primitive types? Which are class types? x. Write an import statement to import the class Scanner; xi. Write an import statement to import the class JOptionPane Use Scanner method to read an integer from keyboard and store that value into the integer variable IDnumber; xii. xii. Use Scanner method to read a person's first name from keyboard and store the name into a String variable firstName
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
