摘要:
Java switch case 语句 switch case 语句判断一个变量与一系列值中某个值是否相等,每个值称为一个分支。 语法 switch(expression){ case value : //语句 break; //可选 case value : //语句 break; //可选 // 阅读全文
posted @ 2021-04-19 17:20
陈诚成
阅读(132)
评论(0)
推荐(0)
摘要:
if选择结构 顺序结构 package struct; public class Domeshunxu { public static void main(String[] args) { System.out.println("hello1"); System.out.println("hello 阅读全文
posted @ 2021-04-19 16:31
陈诚成
阅读(81)
评论(0)
推荐(0)
摘要:
scanner next(): 1一定要读取到有效字符后才可以结束输入。 2对输入有效字符之前遇到的空白,next()方法会自动将其去掉。 3、只有输入有效字符后才将其后面输入的空白作为分隔符或者结束符。 4next() 不能得到带有空格的字符串。 nextLine(): 1 .以Enter为结束符 阅读全文
posted @ 2021-04-19 10:35
陈诚成
阅读(104)
评论(0)
推荐(0)

浙公网安备 33010602011771号