You are on page 1of 14

TAVA DATE

lkat_is JAYA O
JAVA is object mentedl class bajed proqrominq anquna
lanquaag
1
Rr buildn web and derktop pplicahonS
most populon prog ramin ctnuap and lantua4
and lantuá4

choice f Andrid broqruming


Impustant faunts TAVA
JAVA is plad.fom independant anquagt
It open-Souce lanquade
It is pu object-oiented prognommíng lanquaqe
JAVA libravy in tennau and extuna a Veny hug

Which aul the typer in java


Class
Inteaface.
Enum

Annatatiom
Whti clats?
Class is nothinq but bluprint which includey al dah
to dycibe
ClasS Comtaung voiahlesind methody
t beha on objert.
0
Clas u a 6luepnot.or Set dDshuctiony to
built a epeciic type dobjeet.
Is object mientee progsaming
be heue and
Uals cdeitnnino hoo an objeet i
what objeet wi Con teun.
Cla í qrou objech that shaney common
ropetie andhehavicu.
11 is Creatd by wing elals keqwt
PAGE No

OATE

What isobject
0bject isan instone clas
-Obfect i Sep.anat copydmo moy,
-Dbject io 00PS is gelf-Con taned COmponent which
Consist d method and ropenties to malce puiewn
fyn elauta wefl
An 0bjectisTeal-wold entity, Eveay object haj huu thiy
)Shate and ) behavioua.
T4is mectd win ne luyword

lhat i JUM
JVM à (JAVA Vintual mcLLhine) avitual maching
that end bles Computen to unJAVA
ieediom .prran,
t pTovd
pTOvicle Tun time envion nment in which JAVA
bytecede CA be executed.
is allso run those proqrams which au wittet
0 oth landua42
JMM Peafons i)loads code Ri Eexeuuty Code
Venihes tode v) Provide Yunhime
enmyn ment.

Jhat is Method in JAVA


MePhod a uy to penfoom Some uk.
1r a Colleetisn 1osruetions thad pentonn a spuahe tayl
i sed to aschfeve veusability Code
providey eay modificahun and eda bili ty d code.
yn mehods
pre deine method Ex- ()
vsen defHme method, iCode
PAGE
OATE

What Is clutatype in JAVA ?


A clatukype is a set vadue ind a get opeaafiam
clesine om those veuluss.
A clatutype is aelatsification ok doto which h tells
the Compilen ho
tv
the proqrammen 1otendy ue the dao
Thee' CUL two ty Dataype
Primitive olatuhyne 1 - 1 t is staic chauin nahu
Thes o the buuldio block dah mani hulaba
he valuu PD is Rred
Roolea0 (1bit flte) 1nt 4bute 0)
Byte (1 byte-o) lonq byte- dL)
Cha (2 byte -\uooo) () Ploat (4 by te 0.0)
Short (2byte - 0)(6) Double (3 bybe00d)

Non-primitive cla tatype l


Tis aL not redih ne datuhyre.
This Tefened to dbjects Can be ased nu
1his CU eyOaMIL na tuwu me
its VILLul not ced
They muyt, stut wiHh Upeu CoR.
- Ex Sin Arra et

Whati Janiable 4 it type


Vnia ble is a data contaúneA that sBues the data
JAVA pTDqTam execuhn.
valuu clwlinq
Vwuable da
memoyy location name dthe daka.
|- The a two steps to we vauables.
Vcuiable declana ti iot abe; )_
6Vauiable ioitializakion int abc10)
PAGE
DATE

ype d vaniable
0 Ins tanee vauiables
Local wwuable
StaHc vouucabley

0Instance vanoble Non-staHc vaiable) 1-


-Delaned insicle the clal but outside the methad /Conshu t
We need to Create objecthor ealing 1nstancevaúabe
Scope same aobjeet.
Defa valu is 0 foy int float,shont falhe fn booltannd
Local vwiable lempusay vuiableu)i
-Declaned inside the bocl method.
Can be used within Same method whuut is ioitaliud.
No deflt valusf local Vawuabe
-Can ell dvecty within method io yen.upind inl

Static vaniable (clais vwiable )-


Declauud inside the claus outrile method by uina ghdtic
keyword at prefix
Scope1S Same a clastile
Can
Can he Called winq elalsnavaiablesMa bu
ithin H eleu chasname is not Te4uired
requve
Deault valuis a 0,alse 4 Dwll.
PAOE
L OATE

What Aces mod?e its typu


Acess hodifieas aA Objeet-oienteod proq7aming that ir
wed
wed to
to set
accesibility clas, Cormstaitur metnod
-We can Set
deope lus, Conshuturdmthod ui A
Th cU 4 Acey modihes.
Accessmodiien Scope
O Public Anywa in Prosect (10ids outids tla
rivate lithio tw laus umly
Deault Within te packaqe
Proteetd Within Paclcaat but can be acels
nutside ockeqe b win 10heutante
Conceht oy child cla.

lhat the Conkrol stube mens in TAVAY


This a h statmont which rovidu eDnol
ko Hino code Ao execude yum op to bottum
Thu CLAl thrt tye Conho stutements
Decis making stuemen
shadevnenB 1{, Ifelke, ele ludde,akd )
Swiatch stuttmenkt
Loop steutement
hile stelewnent
Do while statement
fos loop
fos each loop
Jump Statement
break statememt.
Con tinu StuteMent
/ PACGH M

DATE

Whad do yu meao by Conshuetur


T h i s aU weed to ioitilouze the object
lass name and Conshuctor nameis Same
Cons hacto clenmt have Tetunn ype, not even voicd
Evey elass haveCons huetor
IttCalled Comshmuctr becauue t Contucts the value
at the time o objeet Creation.
We an have pmvatt rotected 4 public ev detault tm
1h aL three typeo Conshuctr.1-
O Deaut Consucto
4Consauctor is not eeake by_proqramen hen tJAVA
Compilen aubmatically Create a no -a14 enshnuctor cluuing
exeuHon dk proqram1 Called as Detault Congtructr.
Not Vicible to proqrammU. no Crtattd by proqamen

No-avg Conguctor
Conshructer with no agument Caded no-ag Comsuctur
OR atonshut
tor does not derept an paanatn,
i t iCalled no-anq Coms uror.
-Ex-publíc Demo )
T 1 Creadtel by proammen viible to proqmman

)Ao Paaa meduized Conrhuctuy


A Conshue tur with angument (Panametun) 1s lenondn
panameteAized Conghuctoy.
-
Can hav Multiple peuameka at Same time.
PAOE
ATE

Wh is
Inheitante io OPP Concept
1nhenitanee is the proceis dk acquáring hehovidu
and propetie Panent (lar) to thild (cau).
The tlass na which pro puhy iohenits is Sun n iuà
The
The clas 1o
which_propety delivened is Sub UY child do
Foy in henitance extends keyword is yed
lypedInhuitunce
Single level 4pheri tantel- A --
- B
Propentienhettu fom ingle pACnt to Single da.
Multi level Inhenitance 1 CA-- --> C )
-ropentie in hesitefim panent jp child then child
to anothu child. Grand futhu fatun 3 Child
- Minimu) wo child elas auyequired

Hierachical 1nhenitarxe i C-A -- B)


-Propentie nhenitu hun panent to moye than 1 child
Mdple Inheitaote R C)
- Propntie Inheitu um 2uy move panent to child.
This Tnheu tance s not Sumevted in AVA becak_
piaDia mond Ambiguity
Hubrid Inheaitance.
-It is Combi naBiom dh Muliple multilevel Toheitunt
Since multiple
Since is not Suyppoy tul io JAVA Rybmd
alyo not Suppoytdn JAVA
CPaueut clurR4C)
S Child class A paenk D)
D Child eluso B 4 C)
FAGENo./
DATE
/77

3Wha is Diamnt Ambiquity proble in AVA 9


Diamond Ambi quity ioccus at tho tine
mul tipu 1heniance 1 JAVA .

In this ehild clars class C) Ocquirt ta propuhy


both panent claselaysA 4 ) ho hau the
Same method name ml) then Compilen rot
able to decide which method )3houldit inhit.
This situationproblem is Auhg Ambiquity the
ghape ethis is lhu Diamanc Kangenc Callee
Dianend Ambiquty, problem,
1What u Sing
Sinq a non-primitive datahype
-Shmna 1S sequn d chanactuA
Shmng
Smn u a Arau dehanautu
Shiag 1S caus
Shone is immutable

Chan 3 cCI'h', h
Shn ned
CLL Awo w 0ject
Stinq litual
Creattdb wing clouwble quet

9tin edeome 1

By ne keyword
Stnin ( " Weltome ");_
hi
Crtats two objet 4_ r n u niasle
PAGE
DATE

Java Sina prnedy los methud o penrn


8presttion on
shinq Such .

2quod) exatt equa) EJu abe =obt


24ual19noT(aje () Case stnitiv n Abc ACC
8plit) abe123 pit ohc 4 113
5tm (a
length ( Shusham
place)
Stutswith )
enclywth ()
Cocat CLd hwo sh
What is the elfennee beruwean equaly ==
equolu Compouu Cntcunt woVwwsible while
( = )Compn TeteRne nclme dtuo vaiakly.

immutable
S
Sti ela immutable beccuse Cmce
ente
iotante dastinq object Creafed
it Cannot be modiffed.
OATE

What is Awaus
is set e l e
elements which anL Same dlalahuu
cleclancuion Areay
int aC]-new int[]; Sinqle Dimensinal h
i o t al: 1o,to, s0. T store valus ui hnd
Ex
iot al1 =
hed iot ( i0
Stiny s :new aE ShmngliJ;- sing aua
chan clJ - nd chns1 (Chan C
Object clas
Hd to store set dk element with difeunt daahpa
Huad
by win object a Class.
0bject alj ned 0bjeet Cr]
)Two dimons imal Aoray
Ojot aliTj =ne int B ;
( LWhad is ditfunce behwenn his kwor and upen lkd
this ywm
ThA lorad vai able neame anal10ance
Vwuab le
Vuuaslename in Sam clas
Same then ths
ley word wed to USIn local vaniable yuluu
to instan vCiabl

upu eword
Supru ky d ajslqn loceu vaiable valuu
i0stanu aisle in diffenenut cloLss and
yuable ndmes Same jo both clau
GE
AE
Polymsphis m
4 h t Mthod / (oneuct ovenloali na Compkile. time polirg
T A clout Containg move theln on methrd th
the Same ndme is Called o mekod o loadird
ThL Some Tuly foY mehod loadind
Ctuls Shondd be Same
()numbu d peuAdmetus
Ordn dpwna meten Shonudd be ditfntr
daa hyu punamata J
W Can oveuload main method bu tumei
shoul be difeaunt itu io no seaulnu r dhoreun.
e Can @ventoc Static mehods.

kad s Mther oveMidina Dynamic/ Pon ti peymun


- T t ii nofhing bu Recekin t Sdm mathed
TOm punenttls into child elau.
Th at Sume laj methrd ouidina
Yanamukru ehorul be exaety tame.
Inheni lane chenusl be thu mLans t thuull
hoe 2claytu LPauent clus4 ehil kayr)

We Cannot oveuude meuin meHhod 4 static metel


Java

Hhad is na eese
inad isaayawd wth veuiablo,wethod 4 cls.
Aina vaviable -valu Vaniable Cannot_be chanyed.
ind method methau Cannot be oveAidebut Can
beoveload
o elas clas Caonotioheit 4 ovtwsude.
PAGE N

DATE

(What i JOK,JRE and JVM 4 TVM)


Development Kit (twntuos JPE
DK-Java applicahons/Stt0aa
dereloping java
-ustal o7
Runtime envinvn mentcomasns vM)
JRE -Java
-if_provícle envioNoment
fo un/instau java baue
boued

applicahionm
Viytual Machine-Ot _ on ty prodran.
JVM Javo
prorm s.
executin java
-Responsible e

(2)hat i Intaace
- It is blue print dclals
Intuface Contens only sttuic dnd fina vauiables.
methocds CUl public.
In iottntau by deraudt
In 1otukace methods a by olefeuult abshaet
le Cannot sttutiale iteaface

(1 LWab C the Gkeptim


tenminate t
Excep ceptiunn an event ohich wi
Proqramn unexpectedy.
1 d CL hwo tyr Exceptimy
Filenlot Fuund ett. .)
O Checlked Excephn- IOEXLeptiun,
- Exceptio
wkidh a identif by Java Compilea
Un-Checked Exceptiom Avithmcuhic, ullgoint ett
which anl not 10entif by Java Cowpiles
Exceptiun

(2 hat i poly momphism?


isthe Concept whene an obeLt behave
Polymenphism
elfenent in cfenent Situauhim
sLy medns many
mrph medn orm
tuo ty _polymay phsm.
0 Compile tim_ teic_ by
method oveAloadi
Pun timt Dyndmit by
mehed OvAielid
SAlhad Lneap sulabien Java y
datim proceis in which daba ocHon bind
Encaps
toqethan, OY clata d functium wrup togeth 0 n s u
proteetr dada
Enccups uleuhonis a shield that
it olctegec) by Outride,
prevents w being
VOUuable clus CUL hiddenom any otun lalt
auo laUed a olata hiding.
thte it is
hidein
Dala hideing avchieves by dedas de claning t
OLs ivate.
And we claclane method ou hublic o th
Cun be aces tuuka claus tus is
to Ces Vwu hblu 1 Encapsulahun
We ye qettt setten mhols

2 kat i Abshraeion Heno we Can achuve it9


Abshrae hon is the protes hidind centain dutuls

en
ghin eny essentíaljojermdtin to -tha
and ghoine
yAtm seice.
We Can achve abshactm by hdo tys
O By Abshoact claus 0-1007, itrochion)
-Abrtract cleLss Cn be Cread by lucleanna
abtract keyword to cla.
Abhact clau huve abstact method( doesbt
Cox
e t me hod huve bo dy
have bod)
- l huve to implement AN abshact method in
chonld e_ claus by io iohei tunce
y Intatace 1007. abshacio
Intenfate ony
have OC hie v
abshac mehod une
we lan nche" UD bacho.
By Tntnleate we Can arckiave mulhplu jphei tance.
PACF N
Automatim rameworsk rATE 9%/11/21

maven build managme


U
nt tool
maven project name.
ReuchBS fo
SYc/maun/ java
0 Com.BathßS. kuu. pageobjeet
login pom
com. Bateh&s-frun.Utiliby
RaeC las ---> [@lefemethod Brose Open an
AftuMehod hden close
ConhqDota lroviden - -Config.propeubie
ExcelDatafrovielen --data rovidinto tastCaue
Libray-- Common method
U
ndles, chee ek
ExtentReport Genencukur -

->6xtentspune Reporten (
--ExttntRepoy ts ( Ennnmonk
Erent_Tut (b pravid og)
Listenes--s Implements 1Tutirtanu
SYe main/Tesouucey
0 YC /teut/ java
6com.Batthts- ru.Tut
veilyTeyt_001-3 Test
vity fest -002
re/tut/vuouces
maven ole1pendencie -- all ib
pom.x ml -- JC
Conhqpropentieg eey value
Conhq
Tet Data-- data. xlsx Extel ile)
Index .htm
Repurts-
testG x ml

You might also like