Professional Documents
Culture Documents
Durgasoft SCJP
Durgasoft SCJP
> BP we eaant bo aepretent Seat Hombens Compuisany Coe Shovtd go fey
d
> Ftating paint lata typ.
2
Q-Heaktps Print clola—tepa 2-
5 |,
> Hoarty pork: datatypes
°
3
2 park
2 Son pee teer eeeL CTE
2d Stae + Y-dytes p Sze se
5 bY p See lytes
2) Range + ~3-4ede b 3.4038 | Rong + = t1e30% 4 1+Te0e
a9
7 @c want 6 6 ceva | FE we cont 14 4018 deotimar plca dy
O places 5 Gccuracy “chen we | acteaa
“tap
eee aes Gy “Than we. Chota Qe Kr cooble.
co
D Ploat farorse Sigte prectsin, *) double -Patlows dooble. Precision,
hitp://javabynataraj blogspot.com 10 of 255.
OoBean cate ype?
x)
HB,
a
Stae 2 Not Appltenble Cotituat machine cepandent)
Range. + Not Appoble Cage attawed saber ore sbrse f purse)
Whre +b ~Foltaating boolean decuaalins Ome Valid
KY Boolean b= 07 CEy- focompolatble tapes,
—fand sink
Deqptied + boolean
v5 boolean = kaue;
X 3) boolean b= Thue; ce Cast $a Sygtrieck
Symbot 4 Vavable “Thue
Lociten + class Tests
KD beotear be fers’ cer Meow paddle type
Soond + Sora tang Stacey
pegdtied + boolean
MG boolean “TSue = toue
healen § = Téuc.
Bo pints); toue
Tot x207 ;
#0) — oe toot
: ser while CD
Sopincenc’) ar ploc® Mesto”
4, preC HT); — Ce ancampeltle typ
found + rok
Seed +
Segoe + beslea%up/javabynataraj blogspot.com
See ee
eGe
a
ecccecooceuvuceo
Porass
0.¥
KL only allowed alos for TK boolean clatolyper ore “Loud om
fanc’ hae Gse 1S Hipp
chan dotn-type .
=~
+ Sp ald languagea Like ¢ Crt we Gn vie Only ASCH Chonclas
> and to Sepraent all sectr characters BAN ate Eneegh ‘hence chaos
d
; Ste ts. byte
» ~ BE fo Jove toe Gn Use UNMede Chadashes Which Couens coord
; Wide alt alphebeles ely. ~The nods Unicode chaoaslors is >a5e
> & bene Inbyle 6 rot encegh ~to Srepesenl» oil chosacters, Compuisong
; We shovtd go for O-byhs.
2 Ste + Q—bytes
S Rong. + 0 +0 63535
>
> Summer Ne lato +
> Saemeey ay poyintie Cae MPS aig .
ao dishitel Sie Roge. |_Weregercaia efawit Value
2 byte (byte | -a" to dha Cine to 129 Byte °
2
2 Shoat | +bys | -27to a1 [-sovee paar6i) | Shae °
2
fat Abus | Fe BL (anuaatus to ee
: " . Seta aenwestad
oh [ERY sess Long °
OD Heat | u-tyles| ~3.yean to 8ue38 Float cle
3 Govble | g-bybs | -1-Te30e te I-reset Double 0-0
oO Chay Q-byks] 0 te 6soa5 hamacren — |o [reprsents, es,
oO . .
NA (toue/faite aeallon’] blupdigyebenatiy Ni Hgespot Eto dat 255.
betean | riaens se
‘+ A Constant value whith Gn be arejn to the Voodable % Catted
* Lttepa” ;
Tk X= 0
4 oo Consett veive | . _
Sacre § vosdabte | Tderst Fey
Thtepat beteoatg +.
foo the Tkepnat atatype 2 bile, choot arty long) he, Foto ame
Ug, V 5
Naess woe to Sper) Late valve, 2
8:
D deck, \eoales. >
allowed digtts ome 0 t 4
S- fot x= to;
% Octal Mrenarss-
~ Allowed digits ose o to F
> Itkenoy value Should be Prctixed with" 0” ew)
&°- fbr x= olo;
D Hecacectma ews:
> allared dig are 0970 HP oAbF
coceococccoog
> Foatte Guten cite ioe. Can use both Upper case § louses Gse. g
Tht & me ~feo pls wher Zva fs Not uneteo
“F vey tes lane che Ft oe tS Bas~ LHemat value thooid be poefiued tif 02e 69 0% °
Exe- bk x= onto
©
pe x = OXlO
i >oThise ome -tht Only Postible unys to Specihy Totepar Ittenal.
}
& class Teak
d
Pp Sm (Sroiig tags)
d
‘
> t
) ink x= 0;
> tok ¥ 010; (ode “6,
; ok 2= oxi; on8+ ine og
°° =
2 | Se plo Gas Sone tg gto tay, Oe =D,
2 y lo g one+Ixtd 16
> 5
5 afoatit
> D wher 4 ie favost, Cleclasatios one etd
I 4
5 0 tt 200;
y VO tor x= 066;
2 XO tk ve ord, CE! Fokeger number. loo lage
2
~] Ir xs onrnces C4206
ve
MO th %2 OXBEeRB cer em By ; Bxepted
OWE x= ORBea; Bos0
eccee
iS
http:/javabynataraj.blogspot.com 14 of 255.
ic~ Apbleats Easy hhypar [oa 1S Ie type bit toe Gn
Sporty exgtg nl type by Sag tht ow L
Ses '
“F th fot:
X&) tok t= el; cer php L ;
oor +
® Long d= tol; aquired + Ink ;
»
vay foog 4 = 10; y
> “Thire #8 po Way po Specty Tohegrad tesa 4 byk § chant ;
ay ;
‘ups Exphitiy )
PAP woe oe aaagotn Total esa oe, bate Nositbie, & Tak 3
herd (eral 18 with, to a Googe. 5 byte theo Tt trede 03 2
by Bhoat actomabicaiy . gaslesiny Shook (hed also. eo:
2)
By byte. betoz re >
byte b = tae :% SS! PLP 7
ocr tot 2
Recotred + byl 3
10, ¢. e >
Lloatng Pofot, Uhoolg 2- 2
2
Cong Foaling potot heat fe byllooit dovble type @ hing. §
We Gnt assgp direct to float aadable,
~* Bak we Bo Shosrhy eypltctly floating potdl: Utena fe rhe took
+ym by SoPhig IK “Post
Ge K Poot $= B2-us6; Boe ote
Foot p= 193.u56P; rerived Eietbs vnataraj blogspot.com P6255.
Sdovrleis= 9-as6 : v,
ecocoooe> We Gn Saath, floating pote hemes explicrety 8 clooble type. 7)
by SafBrtng sis don D .
1. Gooble d= 188-48610;
> e
x Flak fF. 1g-ussid; CE plp
Kens + chuble
eapires Float:
> we Go Speethy Floatiy Poéok Wena! Only fy decimal fim §
We Gat Spey To Octay & Hea ceefmal Room,
ex.
“5 caste d= 123 -a5é;
a
YD) Cooble d= 0123.UC6; oP! 12a. use
XK dooble d = OXIRS-US6, Cet enatfeoumed looking Poitt Mesa)
VeUvoveve
28) whrch & te ~Pouowing, Floating pots declomaliens axe Valid?
KD Soak $= 122.456;
vy double d= O193.uS6;
XD dovble d= ox123-4% ;
VP dovrle d= orfac; fore? ee “se Bone OE Srookig
® fap & = oxen: i vatos, ove akg fot type.
“@ Float & = obua;
Fusgco
“7 We Go asetin Fobegon Ite! divecky tots fioalig pol dabodyrng
Shee Thegrat Ishesal Gn be Speed eilties clecimar fren ov
Octal frm & here ee
point
oocogcooeoocuoUuKUvESL
hitp:/avabynataraj blogspiot.icom — 16 of 255.dakhe ‘
~? Bok we GS GBSa yD Posting Pott Vewls dovectl sot ‘okegoms ;
tet ioe f= 198.486 » plp
—found : looble ey
SeopSerd = Fok 5
dase 6
= h2eg:
S0-P\n ay ; 1200-0
we Go Seeify ftoatiag pofdt Lslerw enn to Setentelte form
9
Also [exponetian forrn] 6
eA chobte d= bea; 9
9
S-o-plos 3 1200.0 es
Ss:
KY Goat f= tear ce. php 5
Foon a + dovble o
VS Book fe -aert; eer, 3
‘1p\~ \ao0-0
“ °°
9
Beolean Lsteaeng!. oO
he only posebla velo fo te Gaoleao clata-types ame two?
“Oo
D whreh oh the -Fotowwhg Boolean deekoutts De Valid * 5
® boot bao; El Thempiine types oO
ZS® bootear j a °
X ® boolean b= Bue- ____ Pineied: boolean i
7 CE™ Cast find gysbot a
® booten b= tre; Sysobot 5 va Bure 5
fe boo len Berton, 4, 08 Aacanonbe ts
fount + Joos hung iemaveptapiihinesnobsanan, fpr assde.
TR LEY
$
ese.
}
Uovsryrw ow
v
L peti
j
else
4
So ploy’);
5
Ce. IT
$2 ynk
Rt boolean
cCOeCeCOOeEeGOKOLLUULY
tot x07
4 wl
8-0:pINC "Heno”? t
; PID Mento’),
2-0 pi CH");
Foampatible types
found = ft
Drequired + boctean
1
beotear b stare,
SP (b= Patse’)
So PIMC Heto!): eee
4 Soph yes)
else j
q Ase
So-pln (Hi). 4
y 7 Sopot);
5
orp. ys
DFP: pine
boolean b
OS public. F bets ae poubitc thes Onky we Gn acess >
J
@ a salt memberns2- 3
Gefout 2
> BF @ Member ceoarea as he defauit, thin te Gn acras
Rae mente only ifs fy the Curent package G We Gt, actess =)
2
From cote dy wh pocnage,HeNG, clePaolt acess {% algo Kroun af 9
Package level across . 3
9
o
hitp://avibynataraj blogspot.com —1539f-255.© portale meres :
> BP a member chclored as Potvete Thin we Gn ateess Thak member
Only ath the Carrent class
> obshack mettads chovid be wiStble th chid clamea —to paovde
« Rropernentation. hee a Postale meltiods are Nok VFeflle fn Chitd
Clatse® . Hen Pofvake-cbstack Ganksnaiin ts Megat for wethols
© pootected mnermbeass Griz mock efkundessosd smelter tm gaa) t-
, > BP a member dectorwd oS Poutected “then we Gan aceess That:
Meroben evils 0 The Current package Ory where buk Ovb-Side package
Orly fo Cid ciaseex
Pp < default > + kids 4; on ancther pacrage
Cony chid Sefxenee)
)
ee
2
Dee ae
jo toith % The Cument: patrage coe Gan oreens, Packeced members citer by
> Patenk else or by child SeRene.
In
; . fom ovkgtte Packoge we GP actens porctected members only by sg
sid + '
. Sefewne. TF coe ade “hyng to Ose patent defesenG Ge NN Ok CE
> em, Patwege pact:
d pbotte clase A
) q
>
Porokected vetd mi
erect wed Misunderstood maser tr Jove);
4 i”
Q Class B enknd A
PS.vem (Cs
i (—) hitp:/javabynataraj blogspot.com 154 of 255.PA & 200 AL
7 Lams;
SB» zou Bo
vt bemo:;
YA a =r 86
Sp de mO2
Package pacws;
Spook Pent. A;
poblic Claas c ankends A
\
PS vemC_-D
q
A @ =new AU
Am Ud,
C een CO
7 MLD?
A a, 20w CO
Po AO
5
b
cis} noe
i 7"
tee my Le ewnas A
Lu
© exkobe
\—
wo the most Seslnicted
othe nek weshiced modifier
48 * podvate*
> TK most aceestble modifier
fs “pubtte!
Parate < deat 90; s
Ysdo
P-Sv-mC—_) ,
rf po
, Tat b, sped Tat; 2. .
; i
: bj-x = ee, 7 “es
y begs am, Se :
, “Tae by eo Teak;
> cee
; DOPING att GW)
2 5 to 945
° 5
)
Skate members Gn be accased fom both nslace & abalte areas
1 Ghee og Maung munbs Go be acesed only foun Instone aden, cicchy,
> te, , A
; From tale Odea Cae Gast Ciceens thstena Tembeas disotsy offerte
> BE Bi BE Commpfleline Zameen
d
» D Gosiserr tse Poitowt
Nd dectasations
2 MF x ato)
; ,
; Be Stake tnt FAs) D.- Pobe gale vola mL
Fl + ap 00;
4 Y 2 ’
uo So-plnte , Jj
y
hittp:/javabynataraj blogspot.com — 162 of 255.a obeh ty ti oboe We GP take Kevethreo04 Gstifs to Ke
Same crass.
“DS. 2 om
XK BT SM . LE). pop-Ralle vordbe x Groot be acterced
Vo haw Rom gtakic. cenkersth
v2) Dap
Xp ap
xO TD ep
> Sor Shabic wnetfiods Coenpolsasy onplementation Should be available
thor 0.0 By ahelracl vtede Gnplemendetion Shout te. Here
Abstract -Cloke Canbmabin 1S llega for snelhodg,
wwe Ube
—> for Satie mettode Oventoadinn Carcep 1s agpitcble Nena cafits fo
“We Gare dass we Go declare 2 main muttods ath differ’ oogundry
“Class. Tete 3
; ;
>
P- Sven (Statgtd ongs) d
! 2
Soin’ Slakgts "D5 M
2
Pobkic Sabi void matn( fer orgs) >
a
. SoplnC? frees"): 7
4 o
9
Sp. Staiiges o
hutpuijavabynataraj.blogspotcom 163 9f 265.a
— Bub Jv olwoys Gu Stseeg Ar2guemengs TSP THelFed ONY
“the othe main melticd We bove bo Gir eaxpliclly Jose Uke a
Doomar wethed Gi
> Epbevitare ConGpe % appltable fox Glalfc mettods frdoding,
Msine> Methed ena chile exaculig child class sP The Child Goesnot!
Gontair weir walked Tn the Parente Class ‘Min indtind GN be ease
en
Cass p
y
5 P-S-vemC Baggtr agi)
>
) Lo-plo C Posunt Chass");
"
)
7 5
3 Class C extends Pp
) \
, 5
J
) avac p= java
ee
d
>
> P.chass dere
2% Sova p Me Som
3S)
.) Pe@enk Claas pibtene Class.
) PB Seems hak ovennting Gogh ts Onetable Be State meio,
vo bak Ht ie ont oveneniang 1S meld hiding
le Clos p
Do ¢
P gv (—2 hitp://javabynataraj blogspot.com 164 of 255,ey. Class P
}
pS veman CSraiges ong)
S-o-pln(® Parent etasmatn),
Fe te 0 j
yeooeding
“Us bing Class C edtenty, p
2 Ob
PeS-v main Grasege ] ny8)
S.0.PHC chid mein";
y3
Gowde p- Java
p “chats ccs
dova Po gt
foment men
dava ¢ +t
Chid min,
i http:/avabynataraj. blogspot.com
evwveBluyvv wee
©
v
coecoocuouys
165;
ie96
Tralive modifier 4-
— Tele Is “the ide apptichie ony for Mekteds bik ot for Vastables,
ond Classes
> Te Molfve methods one frnpleented fh Some ctken languaga Ike ¢ Rca
eng nate melteds alts Knoun os “foretpo methods ”
1 7 7Be main Obecluea dy nobke Nejoord aoeOto finprove pafornana df the
: Syptern
y OP Fenpoore pesfornana fe Sypeon.
O-w use Olreay Eakstng agony Ron Java Code
» PRGdo Code 9
> > To use native Keyecomal
Class Nobive
’
Stale,
q
© Load Soxp'
rave Hy | Syslrn-toadl-tosayC” alte. sbacays)
@ vere Public nakive void yy) ;
ratty 5
closs chib
1
P-Sv-mC—)
q
Danweke a Nee =p Nabverd;
Pofke mid D.miay
o hitp://iavabynataraj.blogspot.com 166 of 25.
a COO OO ORCC) I Ot
cr
lee9 For poke mettods fnplementalio, % already ovslable $0 alex langoages
Ord we ade Not seipensible to provide finplementahin, Heng palsve.
Method dectaatiny Shovtd Compulsory Eda with “3°
ws ® loss Tat
J ,
Plc Qobve votd tima() :
; i ;
5 CE! Hoakive Mmethed, Gre have a body )
)
@® podlic naltve void MO) 7 3
®o Fi , —
Sf native methods —iepplerpentation chould be availabe #1 Some otfen )
Longooges her aa Rar abshack mulfods Tnplanentotin Spoud ntk-be ovdabe?
2
serge abShrack~Aolive Ginbinotion % ‘Megs Combspottens fos mmelbods, >
d
® ative Meliods Cannot be ceciored Wiis Stoictep modifier betuse _y
“Thine mo gute Tak obt language fotos TEEETS4 Slanted, >
2
g Mer obiskscict Nolive— Gofc=Pp Combrrakion 1s tihgar for Methods, . 2
s 2
Be thatn chsmdankeg of alte Keyoord $5 ir at peat, Poem
Fodepenterk Pokse ds Five. becuse ve ode epenatig on Desulk ef Plbfrm 2
Chpentkot 2
jes
Ot 9
°
9
9
9
oO
i hittp:/javabynataraj.blogspot.com 167 255.5 Syochoontaed 9 “the madther appliable Ror Welbods § Blouss
ae Garst dectade class § Vosioble catty This Keyovord-
@P a tmetkod we) Bloas Ceclared os Synchronized Thin ak a —Hine Only one
tHiiead fs aUwved to openate on we gaen jerk.
y= TE tna, advantage 5 Synebvon aed Kapa % We Con Pesolve data.
> FGenststanay pebiems: Buk the mat, B-havenboge ds Gypchronind Hupane
18M foceans confhig tine dy trad and effect Pesformant 4 ts Gilet
,
>
9 Heng, 2? rise % 00 Specific Dequiement Te % Never gecommended
> 40 use Syncborootzed Keytaood,
>
> 9 bansent’modiPien +
2 i
3 > bonsient % the modi opltiohte ony cfs Nostobles & we Gst-
> opr for ened, % crosses
>
> 7 Oke time dh Seatalicabon, 7 wwe dost cast “tb Save tke Voloe a.
D Pewkeulan vasvalble to meek Setustg Consrsientg , TKD coe Shoot’ Go for
honernt Kejcona
9 9 AE the Hone ah Seodaleantion Tom fypedes “te Oxdytpad Valve eh
—bransient Vodtable B deFait Volve wt be Seovalistahion
O® Volatile” rodeo +. :
—_—r_arrs‘
a
1 7 Volatile 3 “he modifier Cpplicable oniy Br Vosdoble buk not
ra) Methads § Claesed
TE he value d a Vostable keep of Changing Gach type fy vardaltes,
We bwe “to decteoe csth volakite moste
in dectooa cat labile my he etivabynbtas blogspot.com — 168 of 255.B PP qvaniovle ects 0% volatile shen for Gray Thread © Seperate
locas Copy cat be Coated.
> Goes Dhsmedtle @odttadion Reformed by tar Thicad cot takes place,
> locas GPpy Skea f masier Copy
OPE “the value gor Prutized jose here exminahig the Thad th masler’”
Copy} Volue cant be opdated cath lo Stable. Vale ;
,
>
Tocanstakengy problems. y
27K oath chante < volalite Kom fs we Go anktve SeSolve cola,
© Bub 7K asin &advantage dy olaltie Feyeond 4 , Treating & matty?
)
O Seperate Copy for ereoy Head, ncoeasa Corplenty is pogroms,
% Peete pesfoummnn ly the Spleen. tena AF Teese %6 00 Spec eqse"y
Te 1S Peter Delemmended to se volatile Kenacod, & 7 & olrmost 3 :
Outclaked leyrd y
‘> Molotile Vanvalle means H's Value Hap on changes cohere of ' fan” 3
Neotabe Means fH Value Reve charge. Hera Phal— vole Combating 5
fe ‘lege CanbsnaKion hr Vasvabies - 2
Re Only appbable medtten for veo eertbiea fe Sioa 2
> the mattis cahich ore oppltable obly for \fantahles, bob. net for charg O
3
Melliods ade. Volabile ¢ —hansenk
TTR modtfieas cchich ame apgltable oni for _sottods, bok not for Classen F
9
Nositoles pative 4 Synckountad- ;
SR todifiers hth ove appliaile ~COa top Lever otasses, methods i vata
‘hitp://javabynataraj.blogspot.com eve 255.—_{-_1—
[| x |X
:
taj
Kx} x} 9 XP KES] KY] *
Nj «]*
|
|
|
|
S|\] XxX] x
j
SISV AS IS
\
g\>
|
EL SIME SPS] x S] x [x x >
YISES|S
\|S} x]
Am
4
€
&
B
-
g
3
“g
8
.
§
2
s
aan ATF>The Tndtheas cohicb ove cappheble ~b Fone cass bub rot foo
Cuks Classes ane _PORDK, Poctestel, Shalie
“Thlafias
> Frteodbeton
® Aokerface dectaroton © amplamentaiioo
G>_ etlends Ve fimplements
© Fpksfow rairods .
O Whe vosaties 2
@ rkaskea Naty confrcg
©) method Paring 6
© Varione « ”
© mosken ntexfaa
® Adaphin class
@
AbSshack Cas Ve Goreme Class ve Tks Poa.
® diRP. bho -abshace cats § tkelon
cCceeCecueyver yuu bE ee
9
9
hutp:fjavabynateraj.blogspot.com 17196255.Be
Tolefaw:-
2 Ary Scout. Sequtement Specflabion (SRS) & Gnsidenad 08 Eolecfo
> From tie chest putt oh vteo Go ah rleyfaa deBres the Sle eh
Seowvies cahee Expeching ,
1 > foe the Spud pooviden punk 4; view of Tnkefoo defins The
SE ty Seoviey hak & OFfesing
Hera an tlre Cosine 08 Contact blo Client & Sesvie povides
1
» > Oy era Bank AM Gor Ecaen, Book people af hyyptlale the
> Beds Seouios cahut hig oe spheatig AE the Same-Hine Te Some
Scan descarben the Sek wh Geoutis abst End-OSem & Sepected
a
P Heng thts Got Seoen ack a8 Gntoack buy ete bonk peeple & customs”
)
» > cotth to the Thlesfae we Gait Once oy Finplementatin, betose.
J
5, TE bas igh Light Just the St Seovfas cabot we ome offeatg or
) what ypu aw Erpeciny. Hen@ every methed pretenk taste Splesface
d
7 Shooid be abstoas:, Due to Ths Thlesfaa & Conctlesed 0g 1607 Pure
) Obstoack class
d
.) Whok an Entestare 3 - :
)
= “Any Seowla aequiremenk Specifteaen CSRs) em ry Gotoack bles
Client | Seovia paovider (00) too Pose abstract class {5 paling.
uk on Gnteekace .
whe mah) Advani 9
” J 4 Sntovfates Fff>//javabynataraj.blogspot.com 172 of 255.
© ¢
ec}© te Go acheive Security. becavse tae ade oot bighlabhig
OL Frkena)l Foplementoten.
GD Sphaptaméne est loedome Neoy Gosy, because ath ook €ffeelig
OvESde person we GN Change cud Tenet Snplementaton,
® ho dhe Siehewe Go Gmmonitte Vo Eslerfoo, 3
CA Jon atplteaton Gn ate cals mainframe Syekem “Begh drefaa)
>
d
Decoration £ Tmelemertaton dy on ‘Goiefaw 3- 7
—t WE Gn declome on Toefaa by usfog Trtesfan teyesomd, we Go ;
‘Foplement an Fhksfaa by ustog Fanplemnenls Keppoond >
?
fptesfaa Thhex?. a
- =
Vota midds J bydefaut publi abst: veld 177 j
Wid ms); y
4 2
Gbeloack class SeavtaPaoutden frnplements Intect :
4 2
_g_ Public word smi )
a
4 2
5 °
ta 9
> Pha class twpemerk on fhlesfac Compoltany cae. Shoold a
Fenplementati os every matted 4 thik intetas otKanfee toe have 9
~to dectate Clats 03 obstoact. Violation. leads to Comptle-timt Caran.
hupujavabynatara.blogspor.com — 173 gf 255,&
> cohen even Wwe ane. tmplernenkng an Thr Pam telbod Cofrpebsany
ft Shootd be cleclored o& poble ofeoustse coe cst gek Gampelinegooen,
“Exlends No_fenglements $-
1 A clogs Can extend only One clogs ot a time
8A class Gr onplement ony 90: o folerfacs at o Hine.
[3A “Cie Gn dnd a cus and Gr toplena ong 0:4 trhexfons
SFrottanaioosly |
19 On Bokafas. Go Geld ony orks Tolefoas at a Hine,
SS nlesfaa. A
q
4
Toksfac 8
4
a
fokufaa C exknds A,8
q
t
® wher 4 the Forwiatng 6 Tove?
G> A class Gn extend ang ne: dS Cloases ot 2 Mire. X
® A class Go Toplement only ore Erksfoa at a Mma. x,
© © crass Gory enkend a Class ASL Gn Ymplemplty an tksfas but nok
batts Foultaneouely x
a) An Boleshaa Gy extend only one foksPag at a Hime ‘xX
2 © Po Bnkaa Gr finplemek ang nods caste at ame X
© Nore sthe above
eee eee ere DE
hup:/fjavabynataraj blogspot.com — 17} of 255.
\Q) Gosden the Expowsen
Bou wabich tse inesing posite
THis Sapoession % Thue?
© Bots Shooid be Classes
>
® Bots shoord be foksfoas y
Y® Bib Gn be Cither Cles8a or thtesfans, ,
>
@ No Ratricten . >
)
tb >
O X exknds ¥, Zz i,
© X,Y Z shoud be ‘DhesPoas 2
>
® % extends y finplernene 2 2
X,y > Classes a:
2 —s Torsfous >
® X foplemne y exkna KX /O >
he 2
2
2
2
2
Q
2
2
a
9
2
8
U
£
i Ip:favabyrtars} blogspot.com 175 9255.“
2
d
>
)
>
d
>
>
>
)
s)
,
qe.
Thlerfae methods --
cdhadben we adie deciaseiny or Nok, eneay FobesPaa method os by
—ckfault, publ. @ absigack
Si otesfaa Thief.
4
> Noid 1H) 7
[3
poole.
“TO Make This qeliod onailabslty Be eveoy Fmplementobion
toss
absinack »
Because ‘olesfaa, mettods Specifies wequtmements bat
Dot geplementabion
“Hera te -fellecol4 Method dectanahiens ome equal Taide
Tolerfaa »
© Weld mo; ~
@ publi void id;
@ obetnack votd moO;
CD Poblic abshack yetd mi; 7
7 AS evedy fotesfoa melind is bydefoult Poblte & obshrach The
“Following modifies ave not applicable Por forwPaG metals .
© private © Stoic
© paotected | ye CD hats
(2) =lo-0 Tue
Hol <5 | Tue appted to boolean, botaleas
a! < 195 we
2 we Cask apply Srelatonal cperaloas ~fia ~the object types -
* 4
£9)" shonts © < “shonth* —@) duoga® < “durgatza’
CE: openaha < cant be apfied to Siateg, Starry.
iS Neskng ty Raiatsna) opeoatoas cae ade Not allowed to “apply
VEU See
By Bop (to < 80) ;
Pf &o-p Go demand 0% food fi. a
Cases )
wiheeh by i. Fouesing Ttmpoot Stafemenie ame Nake ) 2
cs]
ro Fmpoat java. oft; si
x® Fenposk jovo- URL AL. #) ,
® topint gwo-obiew s” ;
“© tempost fovar Obl. Abs 3
2
Gite 41, 2
, " + Smi- UoiGa
~> Gostlea he Cole, caus, MyParaechict kon ve woke
2
1 3
4 2
2
© “He Cede Compiler —fepe “Bueotteegh woe ape not os opm, |
Glokmenb beGuse ove used Ragauatied Name a
a
Nok. 9
1.
> then every rg hoy Qualifed mane ih 8S nok Srequided to vee
sspokt
Feopoot Slakemenb. then even We ade gu five Bol Bom Pappas.at
Preqvined to ose ~fily Qoaltfied name
ater. tt
Baatipe:- oat aces or
Tropeots fava ull.) oe
Yompoat java Sq).
Cass Tat
4
pesy nC Somer og)
1
Date d= pero Dele cy;
d
4
, Et * Rbrenc. to Date & arnbiuaste |
)
> Notes.
2 exen fy \ick Ese alo we ote gt the Same oagusiy. Prrtbiem,
D Because FE ovaslable in katls OKLG Si packages. :
> ae
> Coseg
>
) Trmpost: Java. uli. Dale ; coder +.
, Frpeat Jove. Qh; sw
eS ‘
; eee © Expo class Fnport
> : ® Classes Potent tn Current
) peSevern C tetas aoa) Works clireshory
> { ® aophdk class tempo.
d Dok d= Meo Botetr; mu ne
a) 5 ae
)
\
J
© Genavsing while Regoveing class names Compiler csi alenays
© QBs. “the Porenédeng. GrThe Fottoc’
ay
orden,
> odden Sie oboe bitp:ljavebynataraj blogspot.com 130 of 255.
| ie :Note?
Sk fs apy Setemmtded “fo -toke coy one class pes Suma the
G ame eb the Me and that. classname must be matched. Ths
Approach frproves Sroadabstihy 4s tke Code.
fmpodt Statement
Class Tes 2
C >
+8- 1 C8tah ,
i m gt ange) >
Aoveylise Le puo Asouulice es, ;
; “4 peo som lisk 03, J Povagltents 3
y SE elslfod Aah ?
2
CEL Gonot Pind Spobot Oe
Syorbot = chess Adoalise Z
Lecahins claas Teak. v
>
> We Gn resolve thts pacbem by sig tay Qoatfed Pome 2
bva-ab, 5
Be Peckiem cst usage of; uty Quatifidname Qxeay ie terete?
2
lenglts «the Cade § redbas readability 2
2
PE GN Ses0Wve “Tt “Pockiern by Using fmpome Stalemen& 2
Tirpoot Java. ubil Aaoylist ; 3
Class Tea f o
P-@v-mnC Sotngcs ange) 8
} AL Lena ALOy
—_
9
1 http:/javabynataraj.blqgspot.com lay ph 25s£b
> where ever ye ode Sing fimpont Stafement th fS not Deqetred
“to use Ruy Quaftfedrame hena % dedoces tmprove eodslély %
Sredoas Lenats of; the Code
Caseig
Tape S topae Sake
La Thee One 2 ~typa dy finpoat Stalenenty
, ©) Exphet class tmpoat
@ Gplict crass Snpeot
Tmpook Stalements
oy
; a
d
) Eapliche class fn poak + Fenplictt crass topos _*
2
5 Ep. fempoot java. util Ab z Syl. Fmpoat Sova oti. #>
3 ~ THR “type hy finponk % byby > Be fs never DeleIMmendad to Ce
» Hedemrmnnded to use . becouse. “this type ey fenpest: becouse fk aedins
2 BE forpsous sreadabsttly Ay the Sreodolthy dy the Code
2 Code.
> > Bek SFtable for Aroveerpel whene
Best Sottable for Hieich City
1 Whine Steaddlitly 8. finposteb ~Hpatg 1% tempantont
i http:/javabynataraj.blogspot.com 128 of 255.Case F}-
when ever we ave finpeotig a pachoge ou Classes § Thlafeas
Poetenk. th Bak package ade aVaitable, bub pok Soh pacrage clasee
cova.
ol Cee? ok :
me Coe [ 3
PTO Se Pattenciars cabich dy th Parag tropa & Suped :
A © Frpook Joua. my ,
¥ © tapoot Greet a eS
© Apoat fava oli regan; 2 :
Y@ Fmport Java 08. e901. patton ; )
Spee >
tke —fononsey Q pang ade Hot Sequoed to Smpook >
bemuse av chasse § Gfafaae patent * Thise 2 partegt are
ONoflable by efavik to _— Jove pregeam 5)
© fovlas lic pacrese.. 2
@ Seda clefartt pocroge (current cooritng dieeetooy) 2
Cake 4 4- v
= v
A fepoot Slakmank fe tohayy Gngletine fesoe tf nd
c
Finponlg Tocmeosea “hid Groptleltne usil be 'nCacased avtometfatly, bab
“Them BR no SFfeok ON Srcecartin rime.
Cc
oO
bttp:/fjavabynataraj blogspot.com 131, 9f 255.Sle, pat “
<> otis Grgpt thtaodyad fm j-Svenston-
Acteedg fo SON Sialfe fopont dngamus Sedesbity 45 the Code,
Bak Aotemctig tO Kool wile poregoraning Experts (Lire us) etolfe Anpoals
Dedluas “te uadabtlthy dy he Cede F Coeaker Confutian, ts not
OeCormminded to Se Galle. Snpart HF Theo. % oe Specie sequivenent
PP OBvally ee Cary acess Ekelte Memburs by oshg Class Hanes, bu.
chen own We ade sing Bhalic finpoak, t fs pok Sequtred —t use
Class mame and we Can acess Mal members isectg
S ——itsook Slate inp ot Stalie tegen
class Tek 1 Sippont sole Jona tang -malt-S, :
fmpont. Skalfe Java -Teng math:
q
psy mCSaiger agp | yas THe
1. g-yern QSrateges 9198)
t
Sorpin (agate);
: opin (Metts. goto);
Sop CMalb, dando), i
S-oploCmatt, moxie, 2), {
y | So-pin (orandom?);
|
Sorpin (enac.0o 255);
5
; 5
ee ere ve euvLe er UES
5
i http:/javabynataraj.blogspot.com 132 of 255.* Eaplatc, aback Sypien ook. pasating 2
—1— oe
eee | Chass Syeteo
p- Stalic Srstog Dawe aya | Staite Phot Siocam Out ;
$ | 4
Test. name « length ©; | ¢ —
om o0E- palintin O37
\ Nattea muta | Gagan \pat teaches
sent 1 Stodag Class
Seach ote / \ present tr Paste,
Bb ie a cass - tka et, cm,
Pome poedenk fro Task class ‘db feactss vente y
fable.
y
th The type Sot Present fo ype. paint Stream
lan present to Spem ?
Sova: lang : a
)
Explanakion 2
~~ ar
> Od feo Stole Vaotable puserk to Sytkm Class ena >
fe Can oreess by Using clossname.
> Bok Wher ever we O7E Usha GhaHe fmpak Te Te mob required»
wty ce clase rame ewe GN acress Ook wookatle rectly . °
2
finpoot Slate Java-lang. Sytem 00€ 7 >
Class Test 2
4 >
ps svemC Statnges orgs) 2
2)
‘ 3
Oot - podnt ln C* Heilo")» yen,
ovk - patoein (Mu)y ye
°
9
hitp:/javabynafaraj.blogspot.com 133,f 255.64
~e Spective Crrolbigoth)
BE finpoat shale Java: lang. Thtegeo. 3;
‘Teppork Shae Jawa lang Byte ay
Clase Tet
Pesvw( Sioggca ass)
So pln Cmax—volue),
5
° h CO DePesera to MAx-VALUE in ombigsty
)
3 Note *-
5 “Tee classes Centaing 0 vaovable om method tail Sarne,
> Dome te ery Coromo Heo. ombyutty poweblen ts aldo. Very
>
5 Gammon to Stale tmpoak -
>
» eet
) > While De solveing Skalie tnembens Cormptien torts Aways
) Gives “The Parecedeng fo he ~Fonowteg orden.
>
> © Garment class Stalic Members
>
)
® Explict Stake gopoat
5 ® frplict Glave. fmpoat -
i hup://javabynataraj blogspot.com 134 of 255.a
‘imponk State spralang. Thregen. Max value; ——> @)
Smpont lade Jovan lang. Byte 4, — ©
Class Tégk
{
Stoic ink MAX value =944; ——» ©
P-8~v. > C Stanger oxy
/
S.0-pin (max -vawed;
}
> @ we ome Coomrnenting Line@. then “Explicit Grate
Tonpost: cots get Pofoatly Hence coe cot gek Fokegenr crass
Max-velve is of aluiuessyy
AP we ame Commentiag Lox § O Then Wyte Class
Max—valoe cot be Considened € toe wth gek 27 9% op.
Que pate)
~ Skctellyy Speaking osage 4 Class Name -& occers
Stakte voovablea % methods tmpoove, readability ah “the Code .
Heng te fs Mot HeGunmended to wSe Stake tmponk
http://javabynataraj. blogspot.com
ct
a
CeCOecooeuveuvebuvveWUGLVeI TLL.7
@® wheh 4 te Poicastog Geopoos Statements aoe ‘valid
X® Fmpoat Spa lang. math 7 ‘Cooe Shovid pot use * oer
the class)
X® Fopont java. long. Moth SEF Cy hoor not use *
Ofte “the method)
A © topont static Jove-long, rath
vO epook. fora lang. mats;
WD feport Balic Javaclang. salts 22
© RO Twpoote State Java-Jang. math. $4" O 4
> pooetems
@ teopost grate Jove. «lang « emuatts. Gab 7
Doomed feeponte” Ve Shake imps
~> We Can Use Teena) Fmpoak bo fmpomt Classe & Sotesfags
dpa prciage.: cohen even coe ame Using genenal fenpoot felts
pot Seysoed to exse Lily Qualtfted Nore § we Can Use shone
Dathes ctoectly.
eouwew cs UE
> We Bo use Sole Impook to fempodt Stoic vastables § methods
ds a class. cohen even toe one USI Salle fomport Then te
{S ODE Sequined —to Class Hare to acess Shake member we
Gn omess oeckty
Ittp://javabynataraj blogspot.com — 136 of 25.Gab Clase ove
a acesedig to WEY
™ ZE fs an Encapgoletien mechon’sm —to gooup elabed Corser
God Ahesfaas Yoko o Stigle modole. he rato ‘Poaposes a; Packages, ;
ame
© TW Aegolve Daring ConP leks ,
OW prove Lecestly In th clases G leefeas. So tht
Vt See Peto Can't anecs chechly
© we twpooves od ast Ay the applicakon. ,
tie fe one Unfueasay Ccaped Covington TO name pacneyes 3
Te to ose Stexnet domein name % Severse. 7
3:
nk load « havsingloan- eos )
/ L \ Q
fe waht? — Gobmnodole eaaai é
omar Tame ‘pene nome, a
fo reverse
2
Set ;
e Cm-doogpiabs + T70bS z 7
Porte chats Hapbs ’
4 2
Po &-vern(Bretag i? ong) ?
i) 2
Sogn” Gurking pbs $s Slay easy") 5
5 o
4 o
http://javabynataraj.blogspqt.com 137, of 255.© Jover Wypees. ova A
> the genusaked class Fre Galt be Plated TS Current coding chisectory