{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

FirstProgram.java -...

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

View Full Document Right Arrow Icon
// Name: Hancheng Dai  // Instructor: Alberto Castro-Hernandez  // CSE 174, Section F  // Date: 9/4/2017  // Filename: FirstProgram.java  // Description: Practice with writing, saving  //              and compiling code  import java.util.Scanner;   // We need this for user input  // Demonstrates some basic programming concepts by  // getting informaton from the keyboard, displaying  // results to the screen, and playing an interactive  // game with the user.  public class FirstProgram {    // The starting point for the program. This mehtod  // calls on the other three methods as needed    public static void main(String[] args) {                      // Declaring local variables for later use       String firstName, lastName;       int goalNumber, userGuess, countGuesses;       int triangleHeight;       Scanner keyboardReader = new Scanner(System.in);              // get user's name       System.out.print("Enter first and last name: ");       firstName = keyboardReader.next();       lastName = keyboardReader.next(); 
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 ]}