+ 1
String Array
What are the options can I use to output the index of a string array?
1 Answer
+ 1
String str = new String("happy learning on sololearn");
System.out.println(str.indexOf("learning"));
// output must be 6.
Instead of passing a string you can pass a character also.