摘要:
package www.nihao; public class demo03 { public static void main(String[] args) { double max=max(10.0,100.0); System.out.println(max); } //求最大数的方法 pub 阅读全文
摘要:
package www.nihao; public class demo03 { public static void main(String[] args) { int max=max(10,10); System.out.println(max); } //求最大数的方法 public stat 阅读全文
摘要:
package www.nihao; import java.util.Scanner; public class demo02 { public static void main(String[] args) { //main方法 Scanner scanner = new Scanner(Sys 阅读全文
摘要:
package www.nihao; public class demo01 { public static void main(String[] args) { //打印三角形 5行 for(int i=1; i<=5;i++) { for (int j=5;j>=i;j--){ System.o 阅读全文
摘要:
package study5ran2yl.study; public class ForDemo02 { public static void main(String[] args) { int[] number={1,2,3,4,5}; //java定义了一个数组 for (int i = 0; 阅读全文
摘要:
package study5ran2yl.study; public class ForDemo01 { public static void main(String[] args) { int h; int l; for(h=1;h<10;h++) { for(l=1;l<=h;l++){ Sys 阅读全文
摘要:
package study5ran2yl.study; public class deno14 { public static void main(String[] args) { //计算1+2+...+100 int x = 1; int sum = 0; while(x<=100) { sum 阅读全文
摘要:
package study5ran2yl.study; import java.util.Scanner; public class demo12 { public static void main(String[] args) { Scanner scanner = new Scanner(Sys 阅读全文
摘要:
package study5ran2yl.study; import java.util.Scanner; public class demo11 { public static void main(String[] args) { //我们可以输入多个数据,用来计算总和与平均值,输入一个字符用回车 阅读全文