1 parent 9a564e6 commit f59fbfaCopy full SHA for f59fbfa
1 file changed
ch06/ValueMethods.java
@@ -2,21 +2,14 @@ public class ValueMethods
2
{
3
public static void main(String[] args)
4
5
- System.out.println("Boolean test");
6
- System.out.println(isDivisible(4,2));
7
- System.out.println(isDivisible(5,2));
+ System.out.println(isDivisible(4, 2));
+ System.out.println(isDivisible(5, 2));
8
9
}
10
11
//Exercise 6.2
12
private static boolean isDivisible(int n, int m)
13
14
- if (n % m == 0)
15
- {
16
- return true;
17
- } else
18
19
- return false;
20
- }
+ return (n % m == 0);
21
22
0 commit comments