一 基本数据结构数据结构
必须包括在类中数学
必须具有 public static main方法数据类型
大小写敏感float
2、数据类型方法
四种整数类型:next
Int 4字节 short 2字节 long8字节 byte1字节数据
二种浮点型static
float 4字节new
douleble 8字节
char类型;boolean类型
常量使用final定义 类常量使用static final定义
3、操做符号
X!=0 &&1/x>x+y //若是X=0,不进行&&后面的计算避免x=0的1/x操做
数学操做符号Math.PI等
4、数值之间转换*
float f=9.98f;
Int i=(int)f; //i=9
Int i=(int) Math.round(f);// i=10
String 比较使用equals
1、 数据读入
Scanner in = new Scanner(System.in);
String name = in.nextLine();
int age = in.nextInt();