import java.util.Scanner;
public class Eext {
public static void main(String[] args) {
//简单查找
Scanner myscanner= new Scanner(System.in);
String[] name = {"亚","托","克","斯"};
System.out.println("请输入要查找的名字:");
String findName = myscanner.next();
int index = -1;
for (int i = 0; i < name.length; i++) {
if (findName.equals(name[i])) {
System.out.println("找到了" + findName);
System.out.println("他的下标是:" + i);
index = i;
break;
}
}
if (index == -1) {
System.out.println("没找到" + findName);
}
}
}