package com.a; public class Test_01 { public static void main(String[] args) { System.out.println("hell0_world"); long l = 100000000000L;//整数默认int,小数默认double 加L声明为Long类型 float f = 1.2412f; int i; i = 1;//变量在输出前必须初始话 System.out.println(i); int aa,bb;//可以一个声明定义多个变量,不推荐 //隐式转换:byte->short->int->long->float->double //强制类型转换 int a = 10; byte b = 20; byte c = (byte)(10+20) } }
java基础01
最新推荐文章于 2024-09-14 18:46:05 发布