很简单的问题。为什么会出现此错误,如何纠正?
运行 Visual Studio Express 2012 Web 版。
先感谢您
我正在做这个小程序,但不幸的是我遇到了这个问题..
if (ccnString.charAt(0) != '4' || ccnString.charAt(0) != '3') {
System.out.println("The String entered does not fit any of the Credit card standards");
System.exit(0);
}
Run Code Online (Sandbox Code Playgroud)
我的程序无法识别我是否在我的String中输入任何整数.
但是,如果我删除了我的|| 最后一部分,if语句识别第一个整数.
我在这里错过了什么?