三章

   if选择结构

       if(condition1){

statements;

.........

}     

     多重if选择结构

     if(condition1){

statements;

........

}else if(condition2){

statements;

........

 }else{

statements;

........

     嵌套if选择结构

           if(condition1){

statements;

..........

        if(condition2){

statements;

..........

}else{

statements;

..........

          }

}else{

  • 产生随机数:int random=(int)(Math.random()*10);//10~0中任意整数
原文地址:https://www.cnblogs.com/s1297-lgy/p/5656001.html