The Zappos Family interview question

Search for a character in a string and split the string based on the character.

Interview Answer

Anonymous

17 Feb 2016

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); } }