2020年2月21日

摘要: package myproject; public class TestMethod { //定义函数 public static void eating() { //没有返回值用void System.out.println("eat函数"); } public static int add(in 阅读全文
posted @ 2020-02-21 16:53 happygril3 阅读(141) 评论(0) 推荐(0)
摘要: package myproject; public class TestBreakContinue { public static void main(String[] args) { //break 跳出循环,结束运行 1234 for (int i=1;i<10;i++) { if(i==5) 阅读全文
posted @ 2020-02-21 16:25 happygril3 阅读(113) 评论(0) 推荐(0)
摘要: package myproject; public class TestWhile { public static void main(String[] args) { //while循环 int b=1;//初始化 while(b<=10) {//条件判断 System.out.println(b 阅读全文
posted @ 2020-02-21 15:59 happygril3 阅读(146) 评论(0) 推荐(0)
摘要: package myproject; public class Switch_Case { public static void main(String[] args) { double d=Math.random(); int e=(int)(d*5); System.out.println(e) 阅读全文
posted @ 2020-02-21 13:05 happygril3 阅读(125) 评论(0) 推荐(0)
摘要: package myproject; public class TestIf { public static void main(String[] args) { double d=Math.random(); int e=(int)(d*5); System.out.println(e); //单 阅读全文
posted @ 2020-02-21 09:28 happygril3 阅读(151) 评论(0) 推荐(0)

导航