CS1073/Source Code/Assignment1/src/InputAndOutput.java

13 lines
606 B
Java
Raw Normal View History

2022-10-07 00:22:46 -03:00
/** @author Isaac Ray Shoebottom (3429069) **/
import java.util.Scanner;
public class InputAndOutput{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("My name is TOM. What is your name?");
String userName = sc.nextLine();
System.out.println("Pleased to meet you, " + userName);
System.out.println("In which program are you enrolled?");
String userEnrollment = sc.nextLine();
System.out.println("Oh? So you're " + userName + ", currently enrolled in " + userEnrollment + '!');
}
}