Skip to content

Commit c560ff5

Browse files
committed
read through ch04
1 parent cd34cf8 commit c560ff5

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

ch04/Exercise.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
public class Exercise {
2+
3+
public static void zoop() {
4+
baffle();
5+
System.out.print("You wugga ");
6+
baffle();
7+
}
8+
9+
public static void main(String[] args) {
10+
System.out.print("No, I ");
11+
zoop();
12+
System.out.print("I ");
13+
baffle();
14+
}
15+
16+
public static void baffle() {
17+
System.out.print("wug");
18+
ping();
19+
}
20+
21+
public static void ping() {
22+
System.out.println(".");
23+
}
24+
25+
}

ch04/Methods.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ public static void main(String[] args) {
1313
double radians = Math.toRadians(180.0);
1414
double degrees2 = Math.toDegrees(Math.PI);
1515
long x = Math.round(Math.PI * 20.0);
16-
double x2 = Math.cos(angle + Math.PI / 2);
16+
17+
double x2 = Math.cos(angle + Math.PI / 2.0);
1718
double x3 = Math.exp(Math.log(10.0));
1819
double x4 = Math.pow(2.0, 10.0);
1920
}

0 commit comments

Comments
 (0)