——3Sept.2008ConfidentialJavaJava3Sept.2008Confidential•••3Sept.2008Confidential•–y=f(x);••••java-03HelloWorld.java3Sept.2008Confidential••–•–3_$–30-9–3Sept.2008ConfidentialwhilesupernewforconstvolatilestrictfpNativefloatclassvoidstaticlongfinallychartryshortinterfacefinalcatchtransientreturnintextendscasethrowspublicinstanceofelsebytethrowprotectedimportdoublebreakthisprivateimplementsdobooleansynchronizedpackageifdefaultassertswitchnullgotocontinueabstract3Sept.2008ConfidentialJavaMAX_VALUEcom.neusoftgetAgesetUserNameCamelageheightavgValueCamelPersonStudentDemoPascal3Sept.2008Confidential•–byte–short–int–long•–float–double•–char•–boolean3Sept.2008Confidential•0..9–255•0..7–0377•0..9,A..F–0XFF0xff-263~263-1L8byteslong-231~231-14bytesint-215~215-12bytesshort-27~27-11bytesbyteintage=10;longsize=200000;3Sept.2008Confidential()•–10–10LLLong3Sept.2008Confidential•–3.143.14d3.14f•–3.14E53E4D3e-5f15D8bytesdouble6-7F4bytesfloatdoubledoublepi=3.14;floatheight=1.85f;3Sept.2008Confidential•–26–••Unicode0-65535\uxxxx\’’\’\\\t\ncharx='a';chary='A';charn='0';chars='#';chart='\n';charc='';3Sept.2008Confidential••truefalse•booleanflag=true;booleanflag=false;3Sept.2008Confidential(primitive)(reference)byteshortintlongfloatdoublecharboolean(class)(interface)(array)3Sept.2008Confidential••()•shortchar•java-03Convert.javabytebyteshortshortintintlonglongfloatfloatdoubledoublecharchar3Sept.2008Confidential•showMe()showMe()ShowMe()ShowMe()3Sept.2008Confidential•JavaA.gotoB.implementC.breakD.include3Sept.2008Confidential•A.DrawRectB.2mailC.classD.a-classE.defaultF.getUserNameG.room#H.User_NameI._valueJ.$changeK.MAX_VALUE3Sept.2008Confidential•byteA.0~255B.0~65535C.-128~127D.-32768~32767E.3Sept.2008Confidential•A.floatf=1F;B.floatf=1.0;C.floatf='1';D.floatf=1;E.floatf=1.0d;F.floatf=4e1;//3Sept.2008Confidential•A.‘AB’B.‘b’C.“123”D.‘\t’E.‘\u123f’3Sept.2008Confidential•A.booleanb=0;B.booleanb=true;C.booleanb=true;D.booleanb='true';E.booleanb=(3=0);F.booleanb=Boolean.TRUE;3Sept.2008Confidential••••java-03Scope.java3Sept.2008Confidential•••3Sept.2008Confidential3Sept.2008Confidential