Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Set(int...num) {
- int[] nums = new int[num.length];
- int[] n = new int[num.length];
- int g = 0;
- for(int i = 0; i < num.length;i++)
- nums[i] = num[i];
- for(int i = 0;i < num.length;i++) {
- for(int index = 0;index < num.length;index++) {
- if(num[i] == num[index]) {
- System.out.println("1");
- break;
- }
- else {
- n[g] = num[index];
- g++;
- System.out.println(n[g]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement