-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnts1.java
More file actions
43 lines (35 loc) · 1.2 KB
/
Copy pathAnts1.java
File metadata and controls
43 lines (35 loc) · 1.2 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
public class Ants1 {
/**
* Demonstrate basic methods
* Silly ant song
*/
public static void main(String[] args) {
verse1();
chorus();
verse2();
chorus();
}
public static void verse1(){
System.out.println("The ants go marching 1 by 1 hurrah, hurrah...");
System.out.println("The ants go marching 1 by 1 hurrah, hurrah...");
System.out.println("The ants go marching 1 by 1 ");
System.out.println("The little one stops to suck his thumb");
System.out.println("");
} // end verse1
public static void verse2(){
System.out.println("The ants go marching 2 by 2 hurrah, hurrah...");
System.out.println("The ants go marching 2 by 2 hurrah, hurrah...");
System.out.println("The ants go marching 2 by 2 ");
System.out.println("The little one stops to tie his shoe");
System.out.println("");
} // end verse1
public static void chorus(){
System.out.println("...and they all go marching");
System.out.println("down");
System.out.println("to the ground");
System.out.println("to get out");
System.out.println("of the rain");
System.out.println("Boom boom boom boom boom boom boom boom");
System.out.println("");
}
}