Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的框架上放了一个密码字段。我将其命名为 pwText(变量名称)。我无法从密码字段中获取输入,以便进行比较。
请注意,需要输入的密码是“userjim”。
String password = new String(pwText.getPassword()); if (password.equals("userjim") { // correct } else { // not correct }