-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
29 lines (22 loc) · 594 Bytes
/
Test.java
File metadata and controls
29 lines (22 loc) · 594 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
29
package String;
import java.util.Arrays;
/**
* Created by rbhatt22 on 12/28/19.
*/
public class Test {
public static void main(String[] args) {
int[] a = {1, 2, 3, 4};
int[] b = {1, 2, 3, 4};
int[] c = {4, 5, 6, 7};
if (Arrays.equals(a, b)) {
System.out.println("a is same as b");
} else {
System.out.println("a is not same as b");
}
if (Arrays.equals(a, c)) {
System.out.println("a is same as c");
} else {
System.out.println("a is not same as c");
}
}
}