java char[] equals函数总返回false?

2024-11-23 03:07:35
推荐回答(1个)
回答1:

char[] p1 = passwordField.getPassword();
char[] p2 = passwordField_1.getPassword();
String s1 = new String(p1);
String s2 = new String(p2);
s1.equals(s2)