✔ 最佳答案
//pk
import java.util.Scanner;
public class Test3 {
public static void main (String[] args) {
Scanner kb = new Scanner (System.in);
System.out.print("Enter name: ");
String name = kb.nextLine();
if (name.indexOf('e') == -1) {
System.out.println ("Character 'e' is NOT present in text ["+name+"]");
}
else {
System.out.println ("Character 'e' is present in text ["+name+"]");
}
}
}