摘要:
流程控制 do{命令}while(布尔式子) 和while一样当不满足布尔式子时结束循环,区别在于 do while至少执行了一次命令 public class DoWhileDemo001 { public static void main(String[] args) { int i=1; in 阅读全文
摘要:
流程控制 switch多选择结构 switch case 语句判断一个变量与一系值中某个值是否相等,每个值称为一个分支 语法 switch(experssion){ case value: 语句} public class ifDemo002 { public static void main(St 阅读全文
摘要:
Java的流程控制 if流程 if的单选择结构 public class ifDemo001 { public static void main(String[] args) { Scanner scanner= new Scanner(System.in); System.out.println( 阅读全文
摘要:
字符串连接符 public class Demo008 { public static void main(String[] args) { int a=10; int b=20; System.out.println(" "+a+b); System.out.println(a+b+" "); 阅读全文