Guest User

Untitled

a guest
Jan 22nd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. public void letterCheck(char[] x) {
  2.         int counter = 0;
  3.         char temp;
  4.         System.out.println(x.length);
  5.         for(int i = 0; i < x.length; i++) {
  6.             temp = x[i];
  7.             System.out.println(temp);
  8.             for(int j = 1; j < x.length; j++) {
  9.                 if(temp == x[j]) {
  10.                     counter += 1;
  11.                     System.out.println(counter);
  12.                 }
  13.             }
  14.         }
  15.     }
Add Comment
Please, Sign In to add comment