-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCSc2010_MyTA.java
More file actions
62 lines (51 loc) · 1.47 KB
/
CSc2010_MyTA.java
File metadata and controls
62 lines (51 loc) · 1.47 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
61
62
public class MyTA {
public static void verse1(){
System.out.println("I once wrote a program that wouldn't compile");
refrain();
}
public static void verse2(){
System.out.println("My program did nothing");
System.out.println("So I started typing");
refrain2();
}
public static void verse3(){
System.out.println("\"Parse error,\" cried the compiler");
System.out.println("Luckily I'm such a code baller.");
refrain3();
}
public static void verse4(){
System.out.println("Now the compiler wanted an identifier");
System.out.println("And I thought the situation was getting dire.");
refrain4();
}
public static void verse5(){
System.out.println("Java complained it expected an enum");
System.out.println("Boy, these computers really are dumb!");
System.out.println("I added a public class and called it Scum,");
refrain4();
}
public static void refrain(){
System.out.println("I don't know why it wouldn't compile,");
System.out.println("My TA just smiled.");
System.out.println();
}
public static void refrain2(){
System.out.println("I added System.out.println(\"I <3 coding\"),");
refrain();
}
public static void refrain3(){
System.out.println("I added a backslash to escape the quotes,");
refrain2();
}
public static void refrain4(){
System.out.println("I added a main method with its String[] args,");
refrain3();
}
public static void main(String[] args){
verse1();
verse2();
verse3();
verse4();
verse5();
}
}