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

Info icon This 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;
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 ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern