摘要:
堆 初始化 package array;public class Demo { public static void main(String[] args) { //动态初始化, int[] num=new int[10]; System.out.println(num[0]); //0 //静态 阅读全文
posted @ 2021-10-06 21:44
clown-lan
阅读(7)
评论(0)
推荐(0)
摘要:
方法 package method;public class Demo1 { public static void main(String[] args) { int sum=add(1,2); System.out.println(sum); } public static int add(i 阅读全文
posted @ 2021-10-06 20:46
clown-lan
阅读(34)
评论(0)
推荐(0)
摘要:
增强for package base;public class Demo8 { public static void main(String[] args) { int[] numbers={1,2,3,4,5}; for(int i=0;i<5;i++){ System.out.println( 阅读全文
posted @ 2021-10-06 19:37
clown-lan
阅读(36)
评论(0)
推荐(0)
摘要:
switch package base;public class Demo7 { public static void main(String[] args) { String str="中国"; switch (str){ case "中国": System.out.println("中国"); 阅读全文
posted @ 2021-10-06 10:44
clown-lan
阅读(40)
评论(0)
推荐(0)
摘要:
Scanner package base;import java.util.Scanner;public class Demo5 { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); 阅读全文
posted @ 2021-10-06 10:43
clown-lan
阅读(19)
评论(0)
推荐(0)
摘要:
terminate 终端 disconnect 断开连接 click 点击 jump 跳 footnote 脚注 definition 定义 阅读全文
posted @ 2021-10-06 09:57
clown-lan
阅读(226)
评论(0)
推荐(0)
摘要:
输出时连接符+ public class Demo4 { public static void main(String[] args) { int a=10; int b=12; System.out.println(""+a+b); //1012 System.out.println(a+b+"" 阅读全文
posted @ 2021-10-06 09:56
clown-lan
阅读(16)
评论(0)
推荐(0)
摘要:
运算符优先级 一级 二级 . [] () ! ~ ++ -- 三级 4级 5级 % * / + - << >> 6级 7级 < > <= > != 8级 9级 10级 & ^ | 11级 12级 13级 && || ?: 14级 = += -= 从右向左 二级 13级 14级 阅读全文
posted @ 2021-10-06 09:30
clown-lan
阅读(31)
评论(0)
推荐(0)
摘要:
ctrl+d 复制当前行到下一行 运算时 short+byte=int 自加 int a=3;int b=a++;int c=++a;//a=5,b=3,c=5 幂运算 double pow=Math.pow(3,2); 短路运算 int c=3;boolean b=(c>4)&&(c++<4);/ 阅读全文
posted @ 2021-10-06 09:18
clown-lan
阅读(48)
评论(0)
推荐(0)

浙公网安备 33010602011771号