I was trying to create a program which can remove any repeating characters in a String. For ex-
This is the code:-
public static void main (String args)
Scanner br = new Scanner(System.in);
System.out.println("Enter a word");
System.out.println("Trimmed word : "+S1);
On running the program I get a StringOutOfBoundException error.
I am a noob and cannot figure out the mistake I did there. Please help me out!
It looks like you're new here. If you want to get involved, click one of these buttons!