What will be the output of the following program?
public class StringSearch
{
public static void main(String[] args)
{
String searchString = "hai this is string search program, haiii now you are attempting.";
int lastIndex = searchString.lastIndexOf("hai");
if(lastIndex == - 1)
{
System.out.println("hai not found");
}
else
{
System.out.println("Last occurrence of hai is at index: " + lastIndex);
}
}
}