-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMelvynWeek01.java
More file actions
28 lines (25 loc) · 805 Bytes
/
Copy pathMelvynWeek01.java
File metadata and controls
28 lines (25 loc) · 805 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 MelvynWeek01{
private int[] myIntArr = new int[] {
1,
2,
3
};
public int[] getMyIntArray(){
System.out.println("Getting int array . . .");
return myIntArr;
}
public void useAnOrComparator(){
System.out.println("Using or comparator . . .");
int x = 1;
if( (x > 1) || ( x == 1 ) ){
System.out.println("Successfully used an 'or' comparison");
}
}
public static void main( String[] arguments ){
System.out.println("Starting to run homework code");
MelvynWeek01 homework = new MelvynWeek01();
int[] intArr = homework.getMyIntArray();
homework.useAnOrComparator();
System.out.println("Finished running homework code");
}
}