if{
String a = "";
while(){
if(){
if(){
a = a + "jas";
}else if{
a = a + "kkk";
}
}
}
System.out.println("Rose"+a);}

解决方案 »

  1.   

    Jbulider 全选代码tab键
    eclipse ctrl+shift+F
      

  2.   

    由于if和while后都没有条件,不知道真假,此题无法计算输出结果~~~思路就是要弄清楚大括号的配对情况,哪个条件管哪段位置。
      

  3.   

    谢谢各位!哈哈,搞定啦!我的意思是我的参数啊a在while循环内赋值后传递不到while循环外即是System.out.println("Rose"+a); 
    ,我感觉理论上应该可以,当然我的if和while循环的条件是合理的。
      

  4.   

    while (rs.next()) { if (rs.getString("qty") != null &&(!rs.getString("qty").equals("0") && (!rs.getString("qty").equals("0.00"))) && (!rs.getString("qty").equals(""))
    ) {...}
    中的rs.getString("qty") != null 放在if(...&&(!rs.getString("qty").equals(null) )参数啊a在while循环内赋值后传递不到while循环外即是System.out.println("Rose"+a); 
    ,我感觉理论上应该可以
      

  5.   

    if{ 
    String a = ""; 
    while(){ 
    if(){ 
    if(){ 
    a = a + "jas"; 
    }else if{ 
    a = a + "kkk"; 



    System.out.println("Rose"+a); 
    }
    不明白lz想干嘛?