-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestCapgamini.java
More file actions
37 lines (31 loc) · 957 Bytes
/
TestCapgamini.java
File metadata and controls
37 lines (31 loc) · 957 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
30
31
32
33
34
35
36
37
package com.interview.all;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class TestCapgamini {
public static void main(String[] args) {
System.out.println(100 + 100 +"Test");
//200 test
//System.out.println("CapGemnini Itnerview" + 100 + 100);
// CapGemini Interview 100 100
/* try{
int i= 10/0;
}catch(Exception e) {
}
catch(NullPointerException e) {}
*/
/*try {
int i = 10/0;
} catch (Exception e) {
// TODO: handle exception
}
catch(NullPointerException n) {}
*/
List<String> list = Arrays.asList("Jon", "Ajeet", "Steve","Ajeet", "Jon", "Ajeet");
Set<String> st = new HashSet<String>(list);
for (String str : st)
System.out.println(str + ": " + Collections.frequency(list, str));
}
}