import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); // 读取输入字符串(不含空格) sc.close(); // 将原字符串转为小写,统一判断标准 String lowerS = s.toLowerCase(); // 查找小写"bob"的第一次出现位置 int index = lowerS.indexOf("bob"); System.out.println(index); } }