2023Java程序員認(rèn)證考試_第1頁(yè)
2023Java程序員認(rèn)證考試_第2頁(yè)
2023Java程序員認(rèn)證考試_第3頁(yè)
2023Java程序員認(rèn)證考試_第4頁(yè)
2023Java程序員認(rèn)證考試_第5頁(yè)
已閱讀5頁(yè),還剩14頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(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ì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論