package com.company;
public class demo04 {
public static void main(String[] args){
int i=10;//二进制
int i2=010;//八进制
int i3=0x10;//十六进制
System.out.println(i);
System.out.println(i2);
System.out.println(i3);
//浮点数
//最好不要用浮点数比较,浮点数是离散的,比较不准确
float f=0.1f;
double d=1.0/10;
System.out.println(f==d);
float d1=56416518654641654f;
float d2=d1+1;
System.out.println(d1==d2);
//布尔值
boolean flag=true;
if(flag==true){}
if(flag){}
//字符串
//栈和堆
//new在堆区申请了不同的存储空间
String sa="hello world";
String sb="hello world";
System.out.println(sa==sb);
String sc=new String("hello world");
String sd=new String("hello world");
System.out.println(sc==sd);
}
}