1
我在StringTokenizer方法中有一个ifstatement问题,我认为这是由于它是一个char数组,我试图转换它,但它似乎不工作任何帮助将prepresed感谢哈里。java token if语句
char[] password = loginPass.getPassword();
StringTokenizer st = new StringTokenizer(theText, ",");
if (thisToken.equals(password))
{
System.out.println("Hi Harry u got the pasword right!!!");
}
您至少需要告诉我们“thisToken”的类型是什么。 – DJClayworth 2010-11-18 14:46:17
我对这种想法的新增加了一些代码,但我不知道在哪里我会找出它是什么类型 – 2010-11-18 14:49:18
亲爱的@Ste_T,你知道吗,因为Java是支持异常的类型化语言,如果你不't给我们提供'thisToken'的类型以及执行此代码时发生的异常或错误,我们将完全无法为您提供帮助? – Riduidel 2010-11-18 14:49:49