版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
第頁(yè)2023Java程序員認(rèn)證考試Java程序員認(rèn)證考試
SunJava認(rèn)證分為兩個(gè)級(jí)別:Sun認(rèn)證Java程序員和Sun認(rèn)證Java開發(fā)員。下面是我整理的關(guān)于Java程序員認(rèn)證考試,希望大家仔細(xì)閱讀!
SUN認(rèn)證
SUN認(rèn)證是給網(wǎng)絡(luò)設(shè)計(jì)界建立的一套認(rèn)證標(biāo)準(zhǔn),Sun公司推出了Java以及Solaris技術(shù)認(rèn)證方案。對(duì)于企業(yè)而言,可以借助這項(xiàng)認(rèn)證作為聘請(qǐng)人才的評(píng)判標(biāo)準(zhǔn),或是作為衡量員工技術(shù)水準(zhǔn)的'依據(jù);在個(gè)人方面,通過(guò)這些認(rèn)證也可以證明個(gè)人的技術(shù)實(shí)力。
1.Java認(rèn)證考試該認(rèn)證主要面對(duì)Java程序員。同時(shí),該認(rèn)證是業(yè)界唯一經(jīng)Sun授權(quán)的Java認(rèn)證,考試內(nèi)容涉及全部Java相關(guān)學(xué)問(wèn)、編程概念及applet開發(fā)技巧。Sun認(rèn)證Java程序員考試旨在視察您通過(guò)應(yīng)用軟件安排進(jìn)行困難編程的實(shí)力,之后還要測(cè)試您完成編程所需的學(xué)問(wèn)。每次考試都包括65道以上的選擇題,時(shí)間大約為90分鐘。目前在這方面有兩項(xiàng)認(rèn)證:SunCertifiedJavaObject
Aninstanceofaclass
Hasstateandbehavior
Stateiscontainedinitsmembervariables
Behaviorisimplementedthroughitsmethods.
Message
Forobjectstointeractwithoneanother
Resultofamessageisamethodinvocationwhichperformsactionsormodifiesthestateofthereceivingobject
Classes
Anobject`sclassistheobject`stype
Theabilitytoderiveoneclassfromanotherandinherititsstateandbehavior
Mostgeneralclassesappearhigherintheclasshierarchy
Mostspecificclassesappearlowerintheclasshierarchy
Subclassesinheritstateandbehaviorfromtheirsuperclasses
Interface
Acollectionofmethoddefinitionswithoutactualimplementations
Fordefiningaprotocolofbehaviorthatcanbeimplementedbyanyclassanywhereintheclasshierarchy.
Packages
Acollectionofrelatedclassesandinterfaces
java.langisimportedbydefaultautomatically
JavaLanguageFundamentals
Theorderforevery"heading"isasfollows:
packagedeclarations--packagemy.applications.uinterfaces;
importstatements--importjava.awt.*
classdefinitions--publicclassmyClass{
Orderofpublicvs.non-publicclassdefinitionsdoesn`tmatter.
Allowsonlyonetop-levelpublicclasspersourcefile
Nameofsourcefilemustbethesameasnameofthepublicclass
main()methodmustbe:
public
static
Notreturnavalue(voidreturntype)
Takeanarrayofstrings:(String[]args)or(Stringargs[])doesn`tmatter
`args`isjustacommonname,youcanuseanynameyoulike.However,theremustbeasetof"[]"
Legalexamples:
publicstaticvoidmain(String[]args)
staticpublicvoidmain(Stringargs[])
CommandlineargumentsareplacedintheStringarraystartingat0afterthejavacommandandtheprogramname
Fornon-appletjavaapplication,theremustbeamainmethod
Forapplet,youdonotusemain()
Applet:
asubclassofPanel,whichitselfisasubclassofContainer
init()-calledwhenappletisfirstinstantiated.
start()-calledwhenthewebpagecontainingtheappletistobedisplayed
stop()-calledwhenthewebbrowserisabouttoshowanotherwebpageandquitthecurrentone
HTMLrequiredtodisplayanappletinawebpage:
PARAMtagallowsyoutopassavaluetoanapplet:
Tousethesevaluesinyourapplet,usethegetParameter(Stringparamname)methodtoreturnthevalueasastring:
greeting=getParameter("message");
JavaIdentifier
Consistsoflettersanddigits
Mustbeginwithaletter,"$"or"_"
Unlimitedlength
Cannotbethesameasareservedkeyword
JavaReservedWord
ReservedKeywordscovercategoriessuchasprimitivetypes,flowcontrolstatements,accessmodifiers,class,method,andvariabledeclarations,specialconstants,andunusedwords
abstract-boolean-break-byte-case-catch-char-class-const-continue-default-do-double-else-extends-final-finally-float-for-goto-if-implements-import-instanceof-int-interface-long-native-new-null-package-private-protected-public-return-short-static-super-switch-synchronized-this-throw-throws-transient-try-void-volatile-while
True,falseandnullareliterals,notkeywords
Primitives
Occupypre-definednumbersofbits
Havestandardimplicitinitialvalues
Typeconversion
Youcannotassignbooleanstoanyothertype.
Youcannotassignabytetoachar.
YoucanassignavariableoftypeXtotypeYonlyifYcontainsawiderrangeofvaluesthanX.
Primitivesinorderof`width`arechar/short,int,long,float,double.
ForObjects,youcanassignobjectXtoobjectYonlyiftheyareofthesameclass,orXisasubclassofY,whichiscalled"upcasting".
Promotion
Inarithmeticoperations,variablemaybewidenedautomaticallyforthepurposeofevaluatingtheexpression
Thevariablesthemselveswouldnotbechanged,butforitscalculationsJavausesawidenedvalue.
Casting
Similartoforcingatypeconversion-valuescanbecastedbetweendifferentprimitivetypes
Donebyplacingthedestinationcasttypekeywordbetweenparenthesesbeforethesourcetypeexpression
Somecastoperationsmayresultinlossofinformation
Variablesderivedfromtheseprimitivetypesthataredeclaredinnestedblockscouldonlybeaccessiblewithinthatblockanditssub-blocks,andaredestroyedwhentheblocktheybelongtoisstopped
Majorprimitivetypes:
PrimitiveType
Size
RangeofValues
Byte
8bit
-27to27-1
Short
16bit
-215to215-1
Int
32bit,allaresigned
-231to231-1
Long
64bit
-263to263-1
Char
16bitunicode
`/u0000`to`/uffff`
(0to216-1)
Javaunicodeescapeformat:a"/u"followedbyfourhexadecimaldigits.e.g.,
charx=`/u1234`
Otherprimitivetypes:
Long-canbedenotedbyatrailing"l"or"L"
Float-canbedenotedbyatrailing"f"or"F"
Double-canbedenotedbyatrailing"d"or"D"
Booleans-trueorfalseonly,cannotbecasttoorfromothertypes
Array-declaredusingthesquarebrackets"[]".Exampleoflegaldeclarations:
int[]x;
intx[];
inti[][];declaresatwodimensionalarray.
Canbecreateddynamicallyusingthenewkeyword
Canbecreatedstaticallyusinganexplicitelementlist
Arrayelementcountsfrom0.Forexample,int[10]actuallyhas10elements,from0to9,notfrom1to10
Arraycanbeconstructedafterdeclaration,ortohaveeverythingdoneonthesingleline
int[]i;
i=newint[10];
OR
inti[]=newint[10];
ArraymemberscanbeinitializedeitherthroughaFORloop,orthroughdirectassignment
intmyarray[]=newint[10];
for(intj=0;j
myarray[j]=j;
}
OR
charmychar[]=newchar[]{`a`,`e`,`i`,`o`,`u`};
Donotgetconfusedwithstring.StringsareimplementedusingtheStringandStringBufferclasses.
BitwiseOperation
numericscanbemanipulatedatthebitlevelusingtheshiftandbitwiseoperators
Javaincludestwoseparateshift-rightoperatorsforsignedandunsignedoperations,the">>"andthe">>>"
>>performsasignedright-shift.Ifthefirstbitontheleftis1,thenwhenitright-shiftsthebits,itfillsina1sontheleft.Iftheleftmostbitis0,thenwhenitright-shiftsthebits,itfillsina0sontheleft.Thefirstbitrepresentsthesignofanumbertopreservethesignofthenumber.
>>>performsanunsignedright-shift.Theleftsideisalwaysfilledwith0s.
<<performsaleft-shift.Therightsideisalwaysfilledwith0s.
JavaOperator
Operatorsthatcomparevalues
equalto,"=="
notequalto,"!="
greaterthan,">"
lessthan,"<"
greaterthanorequalto,">="
lessthanorequalto,"<="
LogicalOperators
logicalAND,"&"
logicalOR,"|"
logicalXOR,"^"
booleanNOT,"!"
short-circuitlogicalAND,"&&"
short-circuitlogicalOR,"||"
Operatorprecedencedeterminestheorderofevaluationwhendifferentoperatorsareused,althoughprecedencecanbeexplicitlysetwithparentheses"()".
Multipleoperatorsofthesameprecedenceareevaluatedfromlefttoright
Inlogicalbooleanexpressions,therightoperandisonlyevaluatedafterthelefthandoperandhasbeenevaluatedfirst.
Forshort-circuitlogicalexpression,ifthelefthandconditiondoesnotevaluatetotrue,therighthandconditionwillnotbeevaluatedatall
ForObjects,==determineswhetherthevariablesreferencethesameobjectinmemory,ratherthancomparingtheircontents.
Forexample,when
Stringx="Hey";
Stringy="Hey";
JavacreatesonlyoneStringobject,sotheresultofcomparisonisalwaystrue.
Toavoidtheabovesituation,usetheNEWkeywordsothatstringxandycanbeofdifferentobjects.
InBooleans,equals()returnstrueifthetwoobjectscontainthesameBooleanvalue.
InString,equals()returnstrueiftheStringscontainthesamesequenceofcharacters.
JavaModifiers
private
Accessibleonlyfrominsidetheclass
Cannotbeinheritedbysubclasses
protected
Accessibleonlybyclassesinthesamepackageorsubclassesofthisclass
public
Canbeaccessedbyanyone
static
Belongstotheclass,nottoanyparticularinstanceoftheclass
Forvariables,thereisonlyonecopyforallinstancesoftheclass.Ifaninstancechangesthevalue,theotherinstancesseethatchanges
Formethods,itcanbecalledwithouthavingcreatedaninstance,andcannotbeusedthethiskeyword,norbereferredtoinstancevariablesandmethodsdirectlywithoutcreatinganinstanceForinnerclasses,theycanbeinstantiatedwithouthavinganinstanceoftheenclosingclass
Methodsoftheinnerclasscannotrefertoinstance
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 農(nóng)業(yè)示范溫室大棚安裝協(xié)議
- 兒童玩具設(shè)計(jì)總監(jiān)聘任合同
- 廠房水電施工合同:印刷業(yè)篇
- 演出器材租賃合同
- 生態(tài)農(nóng)業(yè)園綠化施工合同
- 建筑公司項(xiàng)目經(jīng)理聘請(qǐng)協(xié)議
- 知識(shí)產(chǎn)權(quán)保護(hù)合同規(guī)范
- 圖書館資料儲(chǔ)存分類方法
- 煤礦安全監(jiān)查員工作規(guī)范
- 旅游景點(diǎn)設(shè)施管理
- 家長(zhǎng)會(huì)課件:初三年級(jí)學(xué)生家長(zhǎng)會(huì)
- 【培訓(xùn)課件】《統(tǒng)計(jì)法》宣傳課件 建立健全法律制度依法保障數(shù)據(jù)質(zhì)量
- 醫(yī)院培訓(xùn)課件:《病室環(huán)境管理》
- 數(shù)學(xué)中的微分方程與動(dòng)力系統(tǒng)
- 帶電作業(yè)規(guī)程課件
- 建筑工程《擬投入本項(xiàng)目的主要施工設(shè)備表及試驗(yàn)檢測(cè)儀器設(shè)備表》
- 2024年山東濟(jì)南軌道交通集團(tuán)有限公司招聘筆試參考題庫(kù)含答案解析
- 傳統(tǒng)文化的精髓
- 畜牧業(yè)的生態(tài)循環(huán)與資源節(jié)約
- 旅行社管理系統(tǒng)課件
- 汽輪機(jī)本體檢修要點(diǎn)課件
評(píng)論
0/150
提交評(píng)論