{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

NumericTypes.java - import java.util.Scanner This program...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.util.Scanner; /** This program demonstrates how numeric types and operators behave in Java */ //TASK #2 Add import statement here to use the Scanner class //import java.util.Scanner; // TASK #2 to do - uncomment this line by deleting the leading // // Note: You need to import a class if you do not define it in the same directory with your source code. public class NumericTypes { public static void main (String [] args) { //TASK #2 Create a Scanner object here - help : uncomment the line below by deleting the leading // Scanner keyboard = new Scanner (System.in); //identifier declarations final int NUMBER = 2 ; // number of scores final int SCORE1 = 100; // first test score final int SCORE2 = 95; // second test score final int BOILING_IN_F = 212; // freezing temperature float fToC; // temperature in celsius int average; // arithmetic average String output; // line of output to print out //TASK #2 declare variables used here String firstName; // user's first name // TASK #2 to do - declare user's last name similar way for the first name String lastName;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}