cjy的学习日记

导航

Day007

Base

Demo02

public class Demo02 {
public static void main(String[] args) {
// String a = "hello";
// int b = 10;
// System.out.println(a);
// System.out.println(b);
//八大基本数据类型
int num1 = 1000000000;
byte num2 = 20;
short num3 = 30;
long num4 = 30L;

// 小数: 浮点数
float num5 = 50.1F; //需要加F来定义是float类型
double num6 = 3.1315926535;

//字符
char name = ''; //字符代表一个字
//字符串 ,String是一个类,不是关键字
String namea = "陈靖尧";


//布尔值
boolean flag = true;
boolean flog = false;

}
}

posted on 2021-07-08 16:45  cjy的学习日记  阅读(29)  评论(0)    收藏  举报