摘要:
package com.kuang.struct; // //Demo01 // public class SwitchDemo01 { public static void main(String[] args) { //case穿透 //switch 匹配一个具体的值 char grade = 阅读全文
posted @ 2021-09-19 21:38
Ahao丷
阅读(20)
评论(0)
推荐(0)
摘要:
package com.kuang.struct; import java.util.Scanner; // //Demo01 // public class IfDemo01 { public static void main(String[] args) { Scanner scanner = 阅读全文
posted @ 2021-09-19 21:07
Ahao丷
阅读(24)
评论(0)
推荐(0)
摘要:
package com.kuang.struct; public class ShunXunDemo { public static void main(String[] args) { System.out.println("hello1"); System.out.println("hello2 阅读全文
posted @ 2021-09-19 20:30
Ahao丷
阅读(28)
评论(0)
推荐(0)
摘要:
package com.kuang.scanner; import java.util.Scanner; // //Demo04 // public class Demo04 { public static void main(String[] args) { Scanner scanner = n 阅读全文
posted @ 2021-09-19 20:22
Ahao丷
阅读(31)
评论(0)
推荐(0)
摘要:
package com.kuang.scanner; import java.util.Scanner; // //Demo01 // public class Demo01 { public static void main(String[] args) { //创建一个扫描器对象,用于接受键盘数 阅读全文
posted @ 2021-09-19 20:04
Ahao丷
阅读(37)
评论(0)
推荐(0)
摘要:
package com.kuang.base; /** * @author Kuangshen * @version 1.0 * @since 1.8 */ public class Doc { String name; /** * @author Kuangshen * @param name * 阅读全文
posted @ 2021-09-19 11:44
Ahao丷
阅读(59)
评论(0)
推荐(0)
摘要:
package operator; // //Demo07 // public class Demo07 { public static void main(String[] args) { int a = 10; int b = 20; a+=b; //a = a+b a-=b; //a = a- 阅读全文
posted @ 2021-09-19 11:08
Ahao丷
阅读(19)
评论(0)
推荐(0)
摘要:
package operator; // //Demo05 // public class Demo05 { public static void main(String[] args) { // 与(and) 或(or) 非(取反) boolean a = true; boolean b = fa 阅读全文
posted @ 2021-09-19 11:01
Ahao丷
阅读(31)
评论(0)
推荐(0)
摘要:
package operator; public class Demo04 { public static void main(String[] args) { //++ -- 自增 自减 一元运算符 int a = 3; int b = a++; //先赋值再自增 int c = ++a; //先 阅读全文
posted @ 2021-09-19 10:48
Ahao丷
阅读(28)
评论(0)
推荐(0)
摘要:
package operator; // //Demo01 // public class Demo01 { public static void main(String[] args) { //二元运算符 //Ctrl + D: 复制当前行到下一行 int a =10; int b =20; in 阅读全文
posted @ 2021-09-19 10:42
Ahao丷
阅读(28)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2021-09-19 10:07
Ahao丷
阅读(12)
评论(0)
推荐(0)
摘要:
public class Demo09 { //修饰符, 不存在先后顺序 static final double PI=3.14; public static void main(String[] args) { System.out.println(PI); } } 阅读全文
posted @ 2021-09-19 10:07
Ahao丷
阅读(28)
评论(0)
推荐(0)
摘要:
public class Demo08 { //类变量 static static double salary =2500; //属性:变量 //实例变量:从属于对象;如果不自行初始化,这个类型的默认值 0 0.0 u000 //布尔值:默认是false //除了基本类型,其余的默认都是null; 阅读全文
posted @ 2021-09-19 10:06
Ahao丷
阅读(32)
评论(0)
推荐(0)
摘要:
public class Demo07 { public static void main(String[] args) { //int a, b, c; //int a=1, b=2, c=3; String name = "Ahao"; char x = 'X'; double pi = 3.1 阅读全文
posted @ 2021-09-19 10:06
Ahao丷
阅读(21)
评论(0)
推荐(0)
摘要:
public class Demo06 { public static void main(String[] args) { //操作比较大的数的时候,注意溢出问题 //JDK7新特性,数字之间可以用下划线分割 int money = 10_0000_0000; int years = 20; in 阅读全文
posted @ 2021-09-19 09:36
Ahao丷
阅读(18)
评论(0)
推荐(0)
摘要:
public class Demo05 { public static void main(String[] args) { int i =128; double b= i; //内存溢出 //强制转换 (类型)变量名 高--低 //强制转换 (类型)变量名 低--高 System.out.prin 阅读全文
posted @ 2021-09-19 09:35
Ahao丷
阅读(35)
评论(0)
推荐(0)
摘要:
public class Demo03 { public static void main(String[] args) { //整数拓展 禁止 二进制0b 十进制 八进制0 十六进制0x int i1 =10; int i2 = 010; //八进制0 int i3 = 0x10; //十六进制0 阅读全文
posted @ 2021-09-19 09:20
Ahao丷
阅读(26)
评论(0)
推荐(0)
摘要:
```java package com.company; public class Main { public static void main(String[] args) { //八大基本数据类型 //整数 int num1 =10; //最常用 byte num2 = 20; short nu 阅读全文
posted @ 2021-09-19 09:18
Ahao丷
阅读(27)
评论(0)
推荐(0)

浙公网安备 33010602011771号