package BasicAndDontKnow; public class Test3 { /** * @param args */ public static void main(String[] args) { float float1=0.12f; System.out.println(float1); short short1=1; //short1=short1+1; //å°intè½¬æ¢æshortç±»åï¼é short1+=1;//éå«å¼ºå¶çç±»åè½¬æ¢ System.out.println(short1); //èªå¨è£ ç®±ä¸èªå¨æç®± Integer a=1;//å°1èªå¨è£ ç®±æIntegerç±»å Integer b=new Integer(1); int c=1; System.out.println(a==b);//两个æ¯å¼ç¨çæ¯ä¸åç对象 System.out.println(c==a);//èªå¨æç®±åæ¯è¾ System.out.println(b==c); Integer aInteger=1,bInteger=1,cInteger=127,dInteger=127; System.out.printf("a==b:%s\n",aInteger==bInteger); //æ ¹æ®æºç ï¼ï¼å½Integerçèå´ å¨-128~127ä¹é´æ¶ï¼ä¸ä¼newInteger对象ï¼èæ¯èªå¨å¼ç¨å¸¸éæ± ä¸ç Integer对象 System.out.printf("c==d:%s\n",cInteger==dInteger); //& & && boolean aboolean=true,bboolean=true; System.out.println(aboolean&&bboolean); //Math round:åèäºå ¥ï¼è¿åææ¥è¿çæ´å½¢ //åèäºå ¥åçï¼+0.5ï¼ç¶åè¿è¡ä¸åæ´ System.out.println(Math.round(1.5)+ " "+Math.round(-1.5)); //ç¨æææççæ¹æ³è®¡ç®2*8 System.out.printf("æææççæ¹å¼2*8ï¼2