Tava.
Con Cept
Data abgtraction
Data EnCopsulaton,
. polymnphigm,
. Syoamic
Bindig
Communicat'on,
Mesrage
1. clas
tollection data qod
maniplate data,
membe un etiong that
and
data qre called data menber
Called
Synta clay laname
vanable de claratin
encti'sn doclaration:
2, oboject
An obiect Can be
dafired
adde
inS+ance a clus. TE
Bone meno spae,
Qnd takes
3. Ab gthation. Proers uwhich
infimtn and
the nood
intoy maon The
hido unnearg
ma
4. 'acap Suhtion
a
code anÀ data together tnto a Sing le
athieed bË delA
Varsablp pivate.
the
Ihhentane ctases
The doiving ne
clas re
tom eai loy.
called b s tauses and inheited olales
Called derived alases,
mor phiern,
nd
means many
po'y polynorphiDm mean
than On toro
abil;ty to tak
Binding
eolveol t nntime
method jimplemna tron ui
called
obs'e
mih onented ohiet Tava
an
.objet
wner toeogy qnd elean Simele
to
Simde
Ditibute.
threaded Nuli
tovmane. Per High
Interpreted
ral Achitecture
Neut
bust Ro
laderendent Platyoron
A
tae Por
ented 0 obje
- 2.
Simele I,
Features, Tava 2,
n). meslogeCtn e"nam obsret
tiot, receiviny
n Co,din| hy
r each with eates Conmun 6bject&
pagsing
MegSge 8.
foyiable
Poytable be Couae
gava oytecoe to
tacilitalet Cary the
ng Matm
Cune be C a e
Tara Qe
|.
No plict poinher
class toade
byte code viiter
Ro bust
Suppo stong mernvy anagment
t prode atomaic garbage Colle atin
Tt ha excoptin handling
b. hte ctua Neutal
Java architechue Neut bawE
becase thae here imde mentatiog
dependent teate
Soucce eode
Sava Compler
, tigh Peato manne
thon
Tava
java byode
pegiamming nge
notve Code
close to
Hwtithrende
han ne job ot
Handling
time Sqva
m t
Atbreodin
4. idvibuted
dietibke beCue it
Sava
ereate
oli'gtnbed
Yacilittes
peliatons
Dynamic:
Dynamic lan guge Jt
Sava
dynamic
loading e elases.
1, plattom Inde pondent
inde pondent be case
gava
ote
and run ang ohere tanguge
Sava
2.
Interpete
Tav a
boh Compile and intrpreter.
taye y81e
PogTm
Cvauthg ad
Praa
1. Creting the
4he progam
the
J Running the Prgram
the Progam
ying any tet
Create the Progrqm
tpdpud Then
eitor Sueh a noterd by)
whthe Etes Java.
Stive the pngtam
lename. Gavq
) Compikeg the Pograrn
Program yqv
Corpile the Sava wing
Corpiler.
Syntax
tayac tilename. javg
whare
the Jqva Cornpiler
tlengnt hame he las ngme
Java eatenson
The CompleY Creates the file caled elas i
which Contalas pattnm independent bytecode
Stota ¬laulname class
) Runnin the Prgsqm,
Run the Compiled Program ying Jqva
inte, preter .
Synta
tava clainame
where the java lotes pretey
ava
name
4 thee clas that having
classnqme ma medth.d.
Java Interpreter pnduco machine code trm
the byfe Coca
: Aith metic
2. operatr
Relationa
operaor
4 short hand Assiqnment opetor
Increment decrement operaty
Condit'onl operator
Bitoile operatr
Specia operatoT
1. Arithmetie oppat: wed to pets add.tion
Thel e operat
DuSion
Subttorhon, hulipl(Catin nd
Relulb.
eddition
Subtatt'on
Neltiplcaton
Divisioo
Mo dulo Diuil
Rlaton operatYg
uyed to ahee,
These operatQ
oferan d
the ionghip
velation ghie betoeen
ope,aty 2egult
Wot equal to
gTeater than
7
les than
qreatex than ) equa to
les then os equal to
s) togical oPeyatr
operatur ane
we to cheek
These
whertie an epreSion
Operatoy
togikal
Lgeal
logial
logical
rort hand Gssignment opa ator ,
These opera qe uyed to Rimplit
the
ouding
t aternent
gmple,
OPe, at
ae b
)Inee ment nal DoCeme
\ncement (+t)
tho valu bavaab.le
Dece ment ( - )
docement
b
Nean
Condition a oPpraor:
6) Condlitonal opesats
the
hal
Eondtonal presi ons
to build Simple
three oPeYand.
Stntar :lapresion3
Exprelsi
thee, then
&presionl
ne Conto) movel to
Conto novel to
then the
Bitwie operatoI.
hese peratrg wed o petn
ogic qate! bReations bit by bit.
oPeratY Regult
Bitwile
Bitwise
Bitwe Right ghitt
Ait wite dett ghitt.
Complenent
s) Spe cial
Instan ce
twed to tind out whetha
the
ien obiect belongs te artiear clas
Dot,
Synta
hiectname t'nStance las nqme
Dot C")
Tt wed to access the va abke qhd
hside te
method els
variable (o) method
obiectngrme.
Lo yava variables:
The name iren to he menosy
[oation to Rtore
Rudes
Variable &hald be tmed coith aleabet,
digit, under Seore qnd dollar gmtaol ogy
kepoord.
ð The irt erate mut be an alehabet.
lo wey Cae lette,S
louwer lette,s re
4. Both uppe and
yed,
claving vanabra
the yaY inble ,it heud be
declare in the Progqm,
Syntax late varablo ist:
wher
- the datatype ef varioble
datatyee
Variabes
mma,
Int 4, b,C,
Assigninq values to varialle.
valpx to alody dheclared variables
Thi 3 w
Gving
done with tthe hel of s3oment operator(=).
Synta
variabo name vales
he deelared variable
variablename - ahreay
vele The value to be aasgmed.
Tniiing aiable4:
inital valee to the vaiable
at the me et doclayation
Varialle vle
datatye
int a (o}
Defnull valieea: declare but no
Vaviablo
the ives
iniialied meant
Datye
boclean Yalse
b¡ he
har hull
variable
the vlue et
(i) Print (Î PintIn
output i th
Print - Print thr
Sqme line.
ontol ovel
Printn Print the outpt and the
to the Det line
Scepe e vanables,
OA Variable known
mean A
the
arneng
|. ins tane Vanable
Vanable.
3. loalyqiable
blouk Vaiable
I. Snstance vaable
These vanle deltared injde a
las, TnStahe vanables qre reated ohea
oby'et 4re eroate.
2.
lass variables
these variables are deelared inside a
vanabley
clas oth he keyuoor d ghatc, these
reated by the ay
are ComOn to Qll e obieet 4
3 (ocal raiabl e
Theye vaiables Qre decare ingtde a
Thes e rarables hae
huncton lo) method
hun et'on.
only oithin the
vanable
dectaed
These vasriablel
block boLh identitied bg open'hs and
clesg
wthi'n the
have
mean'n ony
brale
block.
Tava in Saro,
inelit'ual
token iy an
the token8.
wying
TOkene
Contan (or) iterle
s e a t , characteet.
eparator s,
key wordg
oord which belon to jqva
The
have Preditined megnin. Regurd
tonguge They in loecade.
oritten
should be
int ttoat, T, ityelee, void main
D. Tdentiee
clay,methods, varlabie
nam given te
ebjetts, qrayl PgramM,
Rule
1. thee ormed wit lehabel, iits,
under Scove, nd dolla Sgmbl.
muct be an alehabel
The fst charactey
Cade Sensitive.
abc, a mole, ABc
3. Literale
the Constant
Named that iven t
Trte ger liteae
Point terale
tloatng iterae
String
4
SeparotDrs
Smbl that eparate dteent Parts ef
Pogam.
Stmbol ueaning enclose anguments
Paventhesis
braves
codey
Sepaate variables
Semicelon separte the
tateentS.
. Chaacte, Sat
yed to java tolken
(elters, humbe, S, Bgmbol and othar
haac ters
Constant quantity whuo valua does not
PgrM ese utibn.
change during
2. cha acte lonstants
Congtant S.
Conctant&
and So me
Constqnt made up
Spe'al hara ter S
Contqnt:
Point lonstant.
oating
Constant
(onstant
made digte
pointS.
olecimal
Tyeed Contqnt
b octal Contqnt
C. teadetimal Con Stant. o-q A-F
frint Cunttant
dleimal
Poit
Frar'on ony desina Roit
2.
real Con stant
2. Characte
onstant
Shgle character lonstant.
Back Slayh eharo cten eonstan.
Sigle eharactes Conshant.
Single c hara eter encloed wi s ingle
quctation
'.
Bqck sah Charactes eonttan
nore than one charac ter encoed oth
Single quotation The t eharactar muyt be
back
A
\n
9. String Cunttant
Sequene
uotartin,
Hnighna \e345
Exres Sion nd yalunton pretsion
Constant, vaiable ant
I, ith neic
meli ere Sion
2. Relation apressibe,
1. Arth neic pre Siogs
-thele tomed by qthmetic operatorS
(onstant Aritmehe Constant
(or) operatus Vahable
Vanable
a tb
2. Relational Bpreeion g.
Thege tined by relational opeatorg
Sthtax
Constaat
Constant Relationl (or)
(on Vqriale
Variable oPerator!
Speiion,
Agmeti
Erpression.
(atb)
Coikal Sxpreiion s
These
tmedby logial opeyatg
Syotox palational
SpresSlon
oPeyator Cpress ibns
(ayb) 2e
rpressibns insid
î oloeL all the
the paranthesis (o).
c).
T+ doed unay opertion
& TH doe mul4iplrcaton, division, and mod,
1 doey al additio and Subtra thon
the odo
2 does all telatonl nd lojical cerati
6. tt oloei
oPeratbn 3,
Is) -2 t 3
|2 C15-10 / ) -2-3
c\2%3 -2-3
|2x&
g6 = \sl