Search for a character in a string and split the string based on the character.
Anonymous
String s="Super java coding"; char c ='j'; if(s.indexOf(c)!=-1){ String ar [] =s.split(""+c); for (String sa: ar){ System.out.println(sa); } }
Check out your Company Bowl for anonymous work chats.