1
System.out.println/print 的区别只是换行的问题。
2.
数组:
int[] scores=new int[5];
int[][] scores=new int[2][3];
3
.Arrays数组的操作
import java.util.Arrays;
包含数组的排序例如 Arrays.sort(数组名);
转换字符 Arrays.toString();
4
foreach遍历
for(数据类型 遍历的东西:在哪里边遍历){}
ep: for(int score:scores){} //在创建了int[] scores={1,2};成绩单基础上 对数组进行遍历
5
方法:
public访问修饰符+void/int等返回值类型+方法名(int a,int b等参数){函数体}
例:
public class HelloWorld{
public static void main(String[] args){
HelloWorld hello=new HelloWorld(); //这一块需要注意一下
hello.show();
}
public void show(){
System.out.println("abc");
}
}
點擊查看更多內(nèi)容
為 TA 點贊
評論
評論
共同學習,寫下你的評論
評論加載中...
作者其他優(yōu)質(zhì)文章
正在加載中
感謝您的支持,我會繼續(xù)努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦