版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
第頁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)證方案。對于企業(yè)而言,可以借助這項(xiàng)認(rèn)證作為聘請人才的評(píng)判標(biāo)準(zhǔn),或是作為衡量員工技術(shù)水準(zhǔn)的'依據(jù);在個(gè)人方面,通過這些認(rèn)證也可以證明個(gè)人的技術(shù)實(shí)力。
1.Java認(rèn)證考試該認(rèn)證主要面對Java程序員。同時(shí),該認(rèn)證是業(yè)界唯一經(jīng)Sun授權(quán)的Java認(rèn)證,考試內(nèi)容涉及全部Java相關(guān)學(xué)問、編程概念及applet開發(fā)技巧。Sun認(rèn)證Java程序員考試旨在視察您通過應(yīng)用軟件安排進(jìn)行困難編程的實(shí)力,之后還要測試您完成編程所需的學(xué)問。每次考試都包括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. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年資產(chǎn)重組債權(quán)債務(wù)擔(dān)保合同范本3篇
- 2024年版租賃合同(包含租賃物、租賃期限和租金)
- 2024法人聘任協(xié)議
- 2025版年度專業(yè)展會(huì)展位租賃及現(xiàn)場管理合同2篇
- 二零二五年度公共安全設(shè)備采購咨詢及招標(biāo)代理服務(wù)協(xié)議2篇
- 2025年度演出經(jīng)紀(jì)合同標(biāo)準(zhǔn)范本3篇
- 2024年高品質(zhì)皮革批發(fā)購銷協(xié)議模板版
- 2025年度消防工程投資與融資合作協(xié)議3篇
- 2024版建筑材料租賃合同3篇
- 2024版市區(qū)交通圍擋施工及維護(hù)協(xié)議版B版
- 物業(yè)品質(zhì)督導(dǎo)述職報(bào)告
- 2024年山東濟(jì)南軌道交通集團(tuán)有限公司招聘筆試參考題庫含答案解析
- 療愈行業(yè)現(xiàn)狀分析
- 北京海淀區(qū)2023-2024學(xué)年六年級(jí)上學(xué)期期末數(shù)學(xué)數(shù)學(xué)試卷
- 2023年安全總監(jiān)年終工作總結(jié)
- 浙江省杭州拱墅區(qū)2023-2024學(xué)年六年級(jí)上學(xué)期期末語文試題
- 以消費(fèi)者為中心:提升營銷效果的技巧
- 部編版四年級(jí)道德與法治上冊期末復(fù)習(xí)計(jì)劃
- 獸用疫苗管理制度
- 2023瑞幸員工合同協(xié)議書
- 大氣數(shù)據(jù)測試儀校準(zhǔn)規(guī)范
評(píng)論
0/150
提交評(píng)論