if(pro_name.getText() && pro_price.getText() && pro_count.getText())
{
}
在 eclipse java 中遇到错误
参数类型 java.lang.String、java.lang.String 的运算符 && 未定义
最佳答案
if (!pro_name.getText().isEmpty()
&& !pro_price.getText().isEmpty()
&& !pro_count.getText().isEmpty())
条件严格要求java中的 boolean 表达式。
关于Java && 错误 "The operator && is undefined for the argument type(s) java.lang.String, java.lang.String",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24529248/