Access over 20 million homework & study documents

java_programming

Content type
User Generated
Type
Study Guide
Rating
Showing Page:
1/1
1) Goals.java
import java.util.Scanner;
/*
* Author: Nagendra Reddy Date: 1/6/2015
* Filename: Goals.java COP 2551 - Project 1a
* Purpose: This program prompts the user for information and displays a message on the screen.
*/
public class Goals
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
System.out.print("Enter Your Name : ");
String name = sc.next();
System.out.print("Enter Your Age : ");
int age = sc.nextInt();
System.out.print("Enter Your Major : ");
String major = sc.next();
System.out.print("Enter Your Dream Job : ");
String dreamJob = sc.next();
System.out.println();
System.out.println("Hello, my name is "+name+" and I am "+age);
System.out.println("years old. I am enjoying my time studying "+major+", and");
System.out.println("I want to be a "+dreamJob+" when I grow up!");
}
}
Output

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
1) Goals.java import java.util.Scanner; /* * Author: Nagendra Reddy Date: 1/6/2015 * Filename: Goals.java COP 2551 - Project 1a * Purpose: This program prompts the user for information and displays a message on the screen. */ public class Goals { public static void main(String args[]) { Scanner s ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Really useful study material!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4