-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain2.java
More file actions
61 lines (46 loc) · 1.38 KB
/
Copy pathMain2.java
File metadata and controls
61 lines (46 loc) · 1.38 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import java.util.*;
public class Main2 {
// public void helper_function(){
// Scanner sc = new Scanner(System.in);
// int n;
// n = sc.nextInt();
// }
// public static boolean anagram(String s1, String s2){
// if(s1.length() != s2.length()){
// return false;
// }
// char ch1[] = s1.toCharArray();
// char ch2[] = s2.toCharArray();
// Arrays.sort(ch1);
// Arrays.sort(ch2);
// return Arrays.equals(ch1,ch2);
// }
// static {
// System.out.println("Hello I am static block, thank you");
// }
public static void main(String args[]){
// Main2 m = new Main2();
// m.helper_function();
// boolean flag = anagram("bhupendra", "fdggsdsg");
// if(flag){
// System.out.println("Anagrams");
// }
// if(!flag){
// System.out.println("Not anagrams");
// }
//TreeSet<Integer> set = new TreeSet<>();
ArrayList<Integer> set = new ArrayList<>();
set.add(12);
set.add(16);
set.add(6);
System.out.println(set);
}
static {
// System.out.println("Hello I am static block, thank you");
int val = 7;
System.out.println(val);
public static void hello(){
System.out.println("hello");
}
}
}