String s = "I have an orange"; if (s.indexOf("orange") != -1){ System.out.println("orange found"); }
if (s.indexOf("orange") != -1){ System.out.println("orange found");