摘要: demo2 demo3 阅读全文
posted @ 2019-12-19 09:59 anobscureretreat 阅读(294) 评论(0) 推荐(0)
摘要: 获取多个整数输入 获取字符串 获取多个字符串 阅读全文
posted @ 2019-12-19 09:53 anobscureretreat 阅读(3070) 评论(0) 推荐(0)
摘要: public class Sample { public static void main(String[] args) { int num = 10; do { System.out.print(num + " "); } while (num != 10); } } OUTPUT: 10 阅读全文
posted @ 2019-12-19 09:52 anobscureretreat 阅读(623) 评论(0) 推荐(0)
摘要: public class Sample { public static void main(String[] args) { int num = 1; while (num <= 10) { System.out.print(num + " "); num++; } } } OUTPUT: 1 2 3 4 5 6 7 8 9 10 阅读全文
posted @ 2019-12-19 09:48 anobscureretreat 阅读(241) 评论(0) 推荐(0)
摘要: demo2 demo3 阅读全文
posted @ 2019-12-19 09:45 anobscureretreat 阅读(247) 评论(0) 推荐(0)
摘要: public class Sample { public static void main(String[] args) { int num1 = 10, num2 = 20; int num3 = 5, num4 = 7; System.out.println(num1++); System.out.println(... 阅读全文
posted @ 2019-12-19 09:44 anobscureretreat 阅读(140) 评论(0) 推荐(0)
摘要: demo2 阅读全文
posted @ 2019-12-19 09:41 anobscureretreat 阅读(344) 评论(0) 推荐(0)
摘要: demo2 阅读全文
posted @ 2019-12-19 09:37 anobscureretreat 阅读(244) 评论(0) 推荐(0)
摘要: public class Sample { public static void main(String[] args) { String str = "Hello world"; System.out.println("String is: " + str); String str2 = new String("Welcome to java"); System.out.println("The 阅读全文
posted @ 2019-12-19 09:35 anobscureretreat 阅读(3026) 评论(0) 推荐(0)
摘要: public class Sample { public static void main(String[] args) { int num; num = 5; System.out.println("the value of num is " + num); } } OUTPUT: the value of num... 阅读全文
posted @ 2019-12-19 09:33 anobscureretreat 阅读(1546) 评论(0) 推荐(0)
摘要: public class Sample { public static void main(String[] args) { // java compiler ignores the comment System.out.println("Java programmer"); /* * comments make c... 阅读全文
posted @ 2019-12-19 09:31 anobscureretreat 阅读(857) 评论(0) 推荐(0)
摘要: public class Sample { public static void main(String[] args) { System.out.print("Hello programmers!!!"); } } OUTPUT: Hello programmers!!! 阅读全文
posted @ 2019-12-19 09:27 anobscureretreat 阅读(118) 评论(0) 推荐(0)