常量的概念与分类(1) 与常量的打印输出
常量
常量:是指在Java程序中固定不变的数据。
分类
练习
public class ConstantDemo { public static void main(String[] args){ //输出整数常量 System.out.println(123); //输出小数常量 System.out.println(0.125); //输出字符常量 System.out.println('A'); //输出布尔常量 System.out.println(true); //输出字符串常量 System.out.println("你好Java"); }

浙公网安备 33010602011771号