//數(shù)組類型public static void main(String[]args) { //變量類型 變量名字 =變量的值 int[]n...
Study_方法2 study_方法2 =new Study_方法2(); study_方法2.test(11, 34 ); public ...
//實(shí)際參數(shù)专缠,實(shí)際用的參數(shù) int x =max(20, 20); System.out.println(x); //引用參數(shù)居暖,調(diào)試用 ...
break int i =0; if (i==30){while (i<100){ i++; System.out.println(i); ...
一至一百奇數(shù)偶數(shù)的和 for (int i =0; i <100; i++) //o是奇數(shù)s是偶數(shù) if (i %2 !=0) o+=i; }e...
while: int a =1;//初始化條件 while (a<=100){//條件判斷 System.out.println(a);//...
swich(1) //swich匹配一個(gè)具體值 char grade ='A'; switch (grade) {case'A':System....
嵌式結(jié)構(gòu) if (number<=100){ System.out.println("厲害"); if (number>=50){ Syst...
循環(huán)語(yǔ)句 //我們可以輸入多個(gè)數(shù)字,并求其總和和平均數(shù)藤肢,每輸入一個(gè)數(shù)按回車確認(rèn),通過(guò)非數(shù)字 //來(lái)結(jié)束并輸出結(jié)果 Scanner...