看一下,图片,该怎么处理
看一下,图片

为什么andriodCount=0和1时也会出现--
如下图所示
------解决方案--------------------
你的写法跟这种代码是一样的。你忽略了代码是从上至下执行的。下面的代码会否定上面的逻辑
为什么andriodCount=0和1时也会出现--
如下图所示
------解决方案--------------------
public class condition {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String a="0";
String returnStr="";
if(a=="0") returnStr="no process";
if(a=="1") returnStr="process";
if(a=="2"){
returnStr="processed";
}else{
returnStr="--";
}
System.out.println(returnStr);
}
}
你的写法跟这种代码是一样的。你忽略了代码是从上至下执行的。下面的代码会否定上面的逻辑