当前位置:编程学习 > JAVA >>

java if条件中给变量赋值

double a; int b; if(b!=0){ //给a赋值让它等于0.7 }else{ //给a赋值让它等于0.5 }
追问:报错!你没加“;”!
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,