+91-85006-22255
What will be the output of the following program?
public class Flowers { public static void main(String[] args) { String strName; int number; strName = "Rose"; number = strName.indexOf("rose"); System.out.println("Output is " + number); }}
Topic: Java Searching Strings - Java indexOf, lastIndexOf Methods
Read this topic Take test on this topic
Open In App