摘要:
if结构 package com.struct; //if单选择结构 import java.util.Scanner; public class IfDemo01 { public static void main(String[] args) { Scanner scanner = new Sc 阅读全文
posted @ 2021-06-01 23:32
颂溪庄
阅读(104)
评论(0)
推荐(0)
摘要:
DoWhile结构 package com.struct; public class DoWhile01 { public static void main(String[] args) { ////计算 1+2+3+...+100=? int i = 0; int sum = 0; do{ sum 阅读全文
posted @ 2021-06-01 23:30
颂溪庄
阅读(89)
评论(0)
推荐(0)
摘要:
while结构 package com.struct; //while循环 public class WhileDemo01 { public static void main(String[] args) { //输出1~100 int i = 0; while (i<100){ i++; Sys 阅读全文
posted @ 2021-06-01 23:29
颂溪庄
阅读(50)
评论(0)
推荐(0)
摘要:
顺序结构 package com.struct; public class SequenceDemo01 { public static void main(String[] args) { System.out.println("hello01"); System.out.println("hel 阅读全文
posted @ 2021-06-01 23:25
颂溪庄
阅读(35)
评论(0)
推荐(0)
摘要:
输入scanner 1.next() package com.scanner; import java.util.Scanner; /** * next(); * 一定要读取到有效字符后才可以结束输入, * next();不能得到带有控格的字符串。 * 对输入有效字符之前遇到的空格,会自动将其去掉。 阅读全文
posted @ 2021-06-01 10:08
颂溪庄
阅读(593)
评论(0)
推荐(0)

浙公网安备 33010602011771号