+ 1

This has been bothering me

String greeting="SoloLearn"; System.outprint(greeting.indexOf("Solo")); System.out.print(greeting.indexOf("Learn"));

26th Mar 2019, 8:39 AM
Purvesh Pawar
Purvesh Pawar - avatar
3 Respuestas
+ 12
Hi, simply take a look at the language reference whenever you need to know what a class/method/whatever does: https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#indexOf(java.lang.String,%20int)
26th Mar 2019, 11:10 AM
Tashi N
Tashi N - avatar
+ 11
Why has it been bothering you? I think you have missed a dot(.) after System.out in 2nd line
26th Mar 2019, 8:44 AM
Letsintegreat
Letsintegreat - avatar
+ 2
Zlytherin yeah i missed the dot, but i actually want to know how this code works
26th Mar 2019, 8:49 AM
Purvesh Pawar
Purvesh Pawar - avatar