PJF16

dirty countdiff hack

Jan 27th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.24 KB | None | 0 0
  1.   public int countDiff () {
  2.         String numbers = this.toString();
  3.         String[] numb = numbers.split(" ");
  4.  
  5.         Set<String> set = new HashSet<>();
  6.         set.addAll(Arrays.asList(numb));
  7.  
  8.         return set.size();
  9.  
  10.     }
Add Comment
Please, Sign In to add comment