forked from AllenDowney/ThinkJavaCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExercise.java
More file actions
28 lines (23 loc) · 623 Bytes
/
Exercise.java
File metadata and controls
28 lines (23 loc) · 623 Bytes
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
public class Exercise {
public static void zoop(String fred, int bob) {
System.out.println(fred);
if (bob == 5) {
ping("not ");
} else {
System.out.println("!");
}
}
public static void main(String[] args) {
int bizz = 5;
int buzz = 2;
zoop("just for", bizz);
clink(2 * buzz);
}
public static void clink(int fork) {
System.out.print("It's ");
zoop("breakfast ", fork);
}
public static void ping(String strangStrung) {
System.out.println("any " + strangStrung + "more ");
}
}