Professional Documents
Culture Documents
1 LanguageFundamentals
1 LanguageFundamentals
Aname tn Tava program is cleat Tobati bie
4
> Frean be a clay rrame ot melted name ot vatialle name ob
Lebel nome.
Jear clan Tut
t
eddie stabic void main (Stating
r rere
int aslo; @ @ ®
3 L
I 6
Ruts fot Tetewtitpiers 2
AK Rae
4. The onty ablewes! chawacltis in Towa Plewtibiens ote a-¥,
Abez, 0% 4, —Lurderscore) ond 4 (dollar).
Th we are beging to ure omy othin, chavackh, ty we wil gol
Compile time exc:
bakek_craraleet.
botalte xX
e
TLOTNOS6 TIARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786
JDURGA SOFTWARE SOLUTIONS sparen, |
2. Tdectifiors Ghentd rok chat with — oligite, |
€2: betaling — |
(oatotal X
3. Java tdectibéen are Caw Senuitive- Ofeourte Tava
domquoge iteelf i censiclerest os Cote censitbie programming
hemquace.
ex bet Tea
TS
fat numbet =107
we con differentiate
int NOMBER =26; L
WE Case
AE Member =50;
Jt
4: There fc no Demat, Limit fot Tana ftdedtifierr, but fe te
Never aecomrmencted to take fame thay idectifiers beeox it
Aedace aeadatitilg of the code,
% We cant ute Aeserved worebs 04 Tdentifiers,
Ee int a nty
Xia 4 210; 9 ce
Resetved ore +
6 AU preckfined Tava clas names £ fnterfpace names ne Com ue
4 folectibiors
a claws Test
4
Psov mC)
It Stringmio, | fat Runnatt «20;
, S.0 p(Grirg), | S.0-p (Runmatte);
Ea €&
‘PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:950S905786
raDURGA SOFTWARE SOLUTIONS ‘SCJP MATERIAL
> Eanttough fe ic Aegat he ute precktineel Tava class names 4
Titerpoce’ names lng Ielecbifiers, ie
ig met a yes yeni
prackice. Ee gerd programming
| @: wohick te sfollooing Ase valid Fave identibier 2
FE cath © +44
B® total number KO me
RO Yeloncds -
® Frgochare Oo
—@® Fehger
®) Reservesl_wescls 2—
[> Br Taw come wordy are rueved be veprment forme meaning
ob Functionality such bype Of werels ote Collet Reseed worels
Reserved Nevets (53)
Key woos Ceo) Reserved Literate (2)
‘PLOT NO.56, HARSHA CHAMBE!
‘SAI NAGARNEAR BIG C MOBILES, MADHAPl
500034, MOBILE:9505905786DURGA SOFTWARE SOLUTIONS scpmarena |
Und bxprose (a8) \
tiple espe vege bel tapers ne oe & :
dot
da dot velatid relate) Ve |
Atctgpy Hou ceordvol modifiers — Exeaphion eenbling Keponely be 2 ote
bagi 4 pablec by clay neo
Shoal hie privale coke, Reterpae super “@
toy suite protected Hinatly package this
fined How impotl- inttomcat,
pam oe Stesble threnas extent @ ‘
ee i abthook ousattiey) implements
beaten fob ee 7 © ©
beat Tak
Continne .
transient”
“@ Shikpowy
@ L
FH 2 meted wert seliive fthing Win ue Should cteatere hake
meted wilh void ., aelten beype-
[an I 7 te *
teaptin velinn type fe meme peat” inc baweunge veltin type
cred amd clefantt Lier tegpe
Cruseat lenigronrets t— ‘
A. get ¢
lessees oh WF crete sevetel prolleme fy otal Lamgusges,
1? Henee SOs peopl Lamned thie keyword fh ava.
&. Const 3—
I> Use final Instead Of Const.
Notei- By mistake i we ove brgirg Bee gate and cont I
we wit gel compl time errot.
4
PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786DURGA SOFTWARE SOLUTIONS SCIP MATERIAL
Reserved Literate
eee ee
trae
vobues Levlean dete type
fee ie
null = ctefoule volue fel objec reference.
enum (sv) 2
Up we wont te represent a qroup Of named comitanti Wein
Shela ge fet enum.
enum Meni enum Beer
L
TAN, FEB, - Dec; KF, Ko, Re, FO;
3
Conclusions 7—
A. Ay weseved weoets ty Teve contain only bower case ophabt”
Sqrobdls,
2. The new keywords fo eve mie
strichtp —> vw
amat — > bav
enum —— 9 (sv)
3. En Tara, we have ony new keywove , but nok dette Keigeoewel
becon dechustion of wieleyy objectt fe th repensibitihy of
Gostngs Cohecie-
4: sticttp bub net chick Fp
Fratomceof bat mot Tnctance Of
tynchrenixes| bub not Synetronize,
ertends but net extend
Tmplemnenti bute nat implement
import but net imposter
cent bub net — comutenty
PLOT NO\S6, HARSHA CHAMBERS, SAI NAGAR,NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786
=DURGA SOFTWARE SOLUTIONS SCIP MATERIAL
@: Whew ‘the fellorieg Lick Contains ole Tava Tu evedl Werte?
SO ne, debete
K@ gato, conctant-
KO dreate, Cortinus, retire
KO dined, finally, finlixe
KO tro, throws, teronn
X® retity, watcty a
X®@ implements, extents, Fmpevts
xe Slee, Trutomeecty
K@ trttoma Ok, terete p
A@ byte, Shot, Date
None OL the above
eal
Qi ehh Of the Feliosing ane Valid Tava Lesoved werele?
—O public
S_ static
wid
X® main
xe cat
eae
3) Dest, Teyper s—
>In Fave. , every variate hos a Maps, $ every enprenion has a
type 4 every type is Strongly checked,
> Cah 4 exon aidiqrmet — theutd be checked by the compil-
FA bye compatible. |
Heme Tava Language fe considered 05 Shromgly typed programming
bey
PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786
6ae DURGA SOFTWARE SOLUTIONS Soe MATERA
Fava it wot considered os Ruse object iented Propramming
Laguna becoz severol COP feabrrey (Like Mullipte Enhutitbance,
Opeth ovtsleacting JE) ane nel cupported by ava.
AS Mcteowr we are. depending on paimibie debe types rohich ate
hon object.
Primitive Data Type C8)
manent ones clade. types
Cat J cin litte types
boolean, Chas
— >
—> Enegt benlean cmd chat fhe Lemnaining bite bypy ote
Considered a4 Signed tate, bypa becom we Can represent botts fn
ve ve number, 2)
er
integrate types ?— eo
or cq
2) babes mos
Size t 4 byte Ce bits)
( Ms
Max Vale 2 He “ yt ty el]
{ MIN VALUE: —12@ £ 2° af oF ah al 2°
\ Range tote te Heb
a 64 Br Hl6 Feds tHe le
Tet = Sign bit
I Eett as} Sign BIE
o> ve
d—> —ve.
oe toll
— > The MSB actt ay Sign 'e.
> 0 means +ve ntimber 4 1 means —ve numba.
——
PLOT NOS6 HARSHA CHAMBERS, SAI NACARNEAR BIG C MODILES, MADHAPUR-S00084, NOBILE 9S0S905706
I caDURGA SOFTWARE SOLUTIONS
‘SCJP MATERIAL
> He reanbers will be aepresented dive: ty the memory where
Se cornbere Will be represented th ale complement” form.
ex: byte b= to;
bye b= 28;
X byte b= i2@;.
X bye b= toss
K byte b= bau;
Kbyte be “duagas;
> bate tate tegpe fe beak cu tbabe Gf we want bo hamelle alatir in
term of Streams ecIRA drom the file ct from thi nebwook,
4) Sher 2
Po The mack otely weed Act type in Tova ts Shett dite type.
Size ta byt Cee ci]
Range s—segee tp sotet [2't 221)
eu Biot 2 = ater:
Kehr < = says,
PLOT NO.S6, HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786
€7 DURGA SOFTWARE SOLUTIONS, SCIP MATERIAL
Kebort seto.s;
Rohe Sa tre;
J cheat date type fe bet suitable fot We bAe procuscrs Like 8086,
bet Hee precerscls ave Completihy outdid ome hence VRC
cerresponcling — Shobt Aste, Te alee cut-dnted checta type
43) tet
M5 The mek commer ved clita type Tove fe tnt olactay type.
) Sine 2 4 betty Ler —bite]
Range to! de Sl, Enarecsae 2470036 49)
KL
| ink he 214448264
Kat we aaq eae a8, —s Es thet nummer tee deh
Kine a erraresse gers
Kink ae tes;
ce: pup
counsel : heute
required t tnt
i : ce: i il
Kink ae tees CE: incompatible types
found i boolian
wequived ¢ iwk
——
PLOT NO.SE HARSHA CHAMBERS, SAT NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9S05905766
qDURGA SOFTWARE SOLUTIONS SCIP MATERIAL
> Sometime int amy at erveaghy to hold big velaes dhan we
Sheutel go fot long bite Lype
E2WTe beth aroucd of distante travellecl by Light in revo dass
fnck mag net enough than ne shoutel go fo long ctatx bape.
ley Le 1,26,00 X60X60 X24 xt6TD miles;
QB: To held ne 4 chavaclire Pret in a big efile fet oy
nek enough Thy ne shold go for borg clits egg
Size + 8 byte (64-bits]
Roman t 28 te oy
Noti:— Ai{ thi above do typ (hyte, thet fuk, tong) meant fA be
representing fntepral values
Ap we wart te represent HHocting petat- valu ty we
Shewld ge fot Hating potnk dict. types,
4th wa wank 5 te 6 decimod la
plates of aerunate this ne Should | places Of accumasg Ikty we Should
qo fot float, yp fot toute.
le. float follews eingls. precésion, |e. dows follows cteuble precision,
3 Stee: 4 bia 3, Sixe te byl
Remap: ~3.qe3¢ be 3-4e3¢ Range Tatesog te 1.4303
PLOT NO.56, HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786DURGA SOFTWARE SOLUTIONS SCIP MATERIAL
| bolton date bype
Sine: Not Applicalte C VM ctepondont:) |
Ranp 1 Alt Applicelie: Cel onky allen) voles ofthe bron otf)
Ce: Trcompabille kepes
cfounsl 5 int
| ea Coten bo brews
OX booltan b=o;
x boolean b= True:
Bi ink a =05 a
i on
36 op Cue), Soo pele »
he : 3
L
Sop CH)
Chat. data, type?
bated amd the no,
eld bengueges Like ©, Crt ave ASCEL cole
OL ASCEE chotackins ave less trary of equel be 256, -to represent
Beye choraclins shits ave eronghe:
yor the size of char fs At kyle.
He But Taw fs Unit twcle base and the no Of UNE code Chotarlins
awe > 256 Y < 65536,
———
PLOT NOSe HARSHA CHAMBERS, SAI NAGARNEAR BIGC MOBILES, MADHAPUR-S00038, MOBILE:9505905786
uDURGA SOFTWARE SOLUTIONS SCP MATERIAL
To represent thixe cheteclint 8 bite may nat enough — |
Wan we cheuld geo fol 6 bits,
|? Hew thi cine of chat fo ‘ewe fe -¢ byfad.
Sixe 1 2 bytes C16 bits)
Ramet o te 6csas.
Summary ef. Taye Poimithie Dat. Types ¢— 4
Cam sbi 7a
deta type | Size Range cme Defantt value |
byte aby |-2e tae Cette 4) Bgbe °
Shot a byl [saree & sx46t Cal 2'2y)| Shoat - |
inte aby |-2iataesces teiaisescat| Intqa °
Cate 2 |
tome Skye] 264, 262, Long °
Hot | ely | -s.gese te aaese Float on rb:
Aoulle | & byl | —1.¢esoe te |.Fes0g Double cual
boven NA NIA (ablowed voluy raf Bevlean- Folge
char | etyta | 0 & cosas Chrractor | spats chenaclEt
Neti The fawt value fol object weferenee fe null,
4) Literals
xo fry comskant” Vales which ean be attignedt toe Verto
cect Literal,
ent
Dac tgpe] tame vaatable] Constant velo |
eecioctd Thecti fier Likret ~
PLOT NO.S6, HARSHA CHAMBERS, SAI NAGAR.NEAR BIG C MOBILES, MADHAPUR-500034, MOBILE:9505905786
IeDURGA SOFTWARE SOLUTIONS SCIP MATERIAL
| Lategrat
|? Ft Satepret date types Coyle, Shot, tat, beng) we can speethy
Ukrat value io the following mys.
1) Decimal Literals (base —10) 7 —
> Atterseot oligite ose ote FZ
eu ther ae;
2) Octal Literals Chase —s) -—
> Likerat voluu Sheutd Ge prefined oil 0 amel atlewed digits as
ote +.
ent ink a = 010;
| 2) Heraclecémat Literals (bare)?
> Allowed digits are ot 4, a te F.
> Fob eabra digits we can use beth lowet case amd appr Cone
-| ABS A at P).
PP This 4 ome op very cfm ctent where Tava fe met care sensitive.
> Liktslvele chews be prefiacd with 02 A OX,
Jeat int a= oxto;
> The are tha only possible ways te pretty Litrot value.
Gi Which of the following are valid declarchons ?
GS int ante;
K@ ine = OF 86; >.
oO Mt acosss;
GD fob 22 oxFaces
© tet reoxBeof:
<) tt X= OX Beer; > ce
nheger number too
PLOT NO.S6, HARSHA CHAMBERS, SAI NAGARNEAR BIG C MOBILES, MADHAPUR-500034, MOBILE.9505905786
13DURGA SOFTWARE SOLUTIONS SCIP MATERIAL
Ext clang Tet
t
Poo ov me) Cro). = CP, |
Pak a =to; soxe+ixel= optag
ie pooso;
Pak x OxAOS Ce) = CP jy
a '
Lople* tty" tz); = ox Ht xib!a Otf6 ote
r vi Ve
3 1p: to e 4
By efautt every ietegral Liturcl 4
con speethg enplicitty os beng Type: bg
SUM ato;
LetoL;
"2
of int type, but we |
sffined wire La Lb.
t x10;
tat actor; —> (Et PLE
[There fe me direct wag to petty byte ond chett titearal
2 Whiner we are aastgning iekegrod Uteral te the byte variate
mol a the value Buofthin “the vewee Of belt then compiler,
eonnaticatig dest te og byte volume,
> “4 ehoth Literal alo,
ex: byte b =00;
Bye bends
byte b= ing, —>/ce+ pir
TC
TLOTNOSe HARSHA CHAMBERS SATNACARNEAR O1GC MODILES NADITAFUR 300034 MOBILES0S905706
14—
DURGA SOFTWARE SOLUTIONS SCIP MATERIAL |
Both sa s246H3
Flostiy
‘ fe Mkunol doula tape,
> clefantt every octivg pe tak co ‘ F
St we Can speethy enplreitty, as float type by seffined fle
ACE.
Se Heat f 2t2, 4562 —> |\cer rp
Plot fa irs. g5cf:
He can specity englicitty Hosting port Literal a5 clout
Oe een af Wl oo ejecurre They corwenkion Fe
rok wrequited
Er: —deutle de 123.456 07
Font f= 346 Ds
5
ke