-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyClass.java
More file actions
60 lines (40 loc) · 1.8 KB
/
MyClass.java
File metadata and controls
60 lines (40 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
* Write a description of class lesson1 here.
*
* @author (your name)
* @version (a version number or a date)
*/
import java.util.Scanner;
public class MyClass{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Enter some number");
int user_input_number = scan.nextInt();
System.out.print("The entered value is " );
System.out.println(user_input_number );
if (user_input_number < 50)
System.out.println("Check the id, they may be too young.");
else if (user_input_number > 50)
System.out.println("I see you like them older.");
else
System.out.println("Wow, 50? Getting there");
System.out.println("What are you doing this weekend?");
Scanner scan2 = new Scanner(System.in);
String user_input_number2 = scan2.nextLine();
if (user_input_number2.toLowerCase().contains("hunt"))
System.out.println("Not season!");
System.out.print("Are you really ");
System.out.print(user_input_number2 + "?");
//teacher(scan3);
// }
//public static void teacher(String scan3) {
System.out.println("Who is your favorite teacher?");
Scanner scan3 = new Scanner(System.in);
String favTeacher = scan3.nextLine();
if (favTeacher.toLowerCase() != "andreasen" ){
System.out.println("Are you sure? Maybe you spelled his name wrong.");
// teacher (text);
}
System.out.println("Your my favorite too!");
}
}