public static void main(String[] args) throws IOException {
FileReader fr = new FileReader("ooo3.txt");
StringBuilder sb = new StringBuilder();
int len;
while ((len = fr.read()) != -1) {
sb.append((char) len);
// System.out.println((char)len);
}
//System.out.println(sb);
String s = sb.toString();
int cnt = 0;
int a = 0;
char[] chars = s.toCharArray();
for (int i = 0; i < chars.length; i++) {
if (chars[i] == 'h') {
a = i;
}
}
System.out.println(a);
System.out.println(s.substring(a, chars.length));
Scanner sc = new Scanner(System.in);
System.out.println("请输入密码");
String mima = sc.next();
while (!mima.equals(s.substring(a, chars.length))) {
System.out.println("密码输入错误