```java
package day10;
import java.io.FileInputStream;
public class Tiqu {
public static void main(String[] args) {
StringBuilder s1=null;
StringBuilder s2=null;
try {
FileInputStream in = new FileInputStream("D:\\eclipse\\lianxi\\day19\\src\\day10\\haha1.txt");
byte[] b = new byte[100];
int len = 0;
while ((len = in.read(b)) != -1) {
s1.append(new String(b, 0, len));
}
in.close();
} catch (Exception e) {
e.printStackTrace();
}
try {
FileInputStream in1 = new FileInputStream("D:\\JAVA\\haha2.txt");
byte[] b = new byte[100];
int len = 0;
while ((len = in1.read(b)) != -1) {
s2.append(new String(b, 0, len));
}
in1.close();
} catch (Exception e) {
e.printStackTrace();
}
if(s1.equals(s2)){
System.out.println("密码错误");
}else{
System.out.println("打印成功");
}
}
}
```