09 2021 档案
摘要:public class Demo08 { // final static double PI = 3.14; public static void main(String[] args) { System.out.println(PI); }}
阅读全文
摘要:public class Demo06 { public static void main(String[] args) { //int a=1,b=2,c=3;//程序可读性 String s = "jiangmu"; char m = 21; double n = 873; }}
阅读全文
摘要:public class Demo07 { ////类变量 static static double salary = 2500; //属性 变量 //实例变量;从属于对象;如果不自行初始化,这个类型的默认值,0 0.0 //布尔值:默认是false //除了基本类型,除了默认值都是null Str
阅读全文
摘要:public class Demo05 { public static void main(String[] args) { int money = 10_0000_0000; System.out.println(money); int years = 20; int total = money*
阅读全文
摘要:public class Demo04 { public static void main(String[] args) { int i = 128 ; byte d = (byte) i;//内存溢出 //强制转换 (类型)变量名 由高到低 //自动转换 由低到高 System.out.print
阅读全文
摘要:public class Demo03 { public static void main(String[] args) { //整数拓展 :进制 二进制0b 十进制 八进制 0 十六进制 0x int i = 10; int i2 = 010;//八进制0 int i3 = 0x11;//十六进制
阅读全文
摘要:public class Demo02 { public static void main(String[] args) { //八大基本数据类型 //整数类型 int num1 = 10;//最常用 byte num2 = 20; short num3 = 30; long num4 = 40L;
阅读全文
摘要:public class Demo01 { public static void main(String[] args) { String Ahello="jiamgmu"; String ahello="jiamgmu"; String $hello="jiamgmu"; String _hell
阅读全文
摘要:public class Helloworld { public static void main(String[] args) { //单行注释可以注释一行文字 //输出一个Hello,world! System.out.println("Hello,World"); }}//多行注释/**/ /
阅读全文

浙公网安备 33010602011771号