import java.util.ArrayList;
public class jiandanshiyong<nu> {
//prsf
private static final nu;
public static void main(String[] args) {
//prsf
//sout输出system.out.println
System.out.println("this is my world");
//soutv,输出变量
int number=1;
System.out.println("number = " + number);
//或者xxx.sout
System.out.println(number);
//循环fori
String[] arr=new String[]{"sa","sb","sc"};
for (int i = 0; i < arr.length; i++) {
System.out.println(i);
}
//增强for循环iter
for (String s : arr) {
System.out.println(s);
}
//常用for循环itar
for (int i = 0; i < arr.length; i++) {
String s = arr[i];
System.out.println(s);
}
//list.for
ArrayList arrayList=new ArrayList();
arrayList.add(123);
arrayList.add(456);
for (Object o : arrayList) {
}
//list.fori
for (int i = 0; i < arrayList.size(); i++) {
}
//list.forr
for (int i = arrayList.size() - 1; i >= 0; i--) {
}
}
public void method(){
//ifn
ArrayList arrayList=new ArrayList();
if (arrayList == null) {
}
//inn
if (arrayList != null) {
}
//*.null
if (arrayList == null) {
}
//*.nn
if (arrayList != null) {
}
//new 类名(.var或者ctrl+alt+v)
//shift+f6选中并修改所有变量名
}
}
标签:arr,int,模版,arrayList,idea,System,println,out
From: https://www.cnblogs.com/tgfoven/p/17024959.html