0% found this document useful (0 votes)
4 views11 pages

Adobe Scan Apr 22, 2022

The document outlines key concepts in object-oriented programming, including data abstraction, encapsulation, inheritance, and polymorphism. It also discusses the structure of Java programs, including the use of classes, methods, and data types. Additionally, it emphasizes the importance of syntax and conventions in Java programming, such as case sensitivity and the declaration of variables.

Uploaded by

pikudiptalokdash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views11 pages

Adobe Scan Apr 22, 2022

The document outlines key concepts in object-oriented programming, including data abstraction, encapsulation, inheritance, and polymorphism. It also discusses the structure of Java programs, including the use of classes, methods, and data types. Additionally, it emphasizes the importance of syntax and conventions in Java programming, such as case sensitivity and the declaration of variables.

Uploaded by

pikudiptalokdash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

S o rslructim5 Pscgrumme Packae

or
(Thace.dut Otented PL) Obyed omented P/L)
upbe ersion Ett
Visuol pasic
Bsit
ua
fcbol Cot ne
e

COP
H e hbinton dOknect oienteol pogamming
1Qivemoxy Tmpodanco to t drect 1nStec ob o psoes
System.
i s Lery_chbsed doReas Lwoslo SHtity
haollowing Chasnceistics.

DatAksiaction
Data rapaulation
*Data nheaitone
¥Data moluladitg
Data
Data olymoaphism

EssenHic feaptae
Dala Abstnaction ACtOb xepxesening
backasOUnd chtaAlstractiun.
hou olieepadm delails s colled
DGa ncapsulation oappingup ok atamembeb &.
A060 a Sgie uniHelas
iHs SCiotedmemoeriunition
6 colleo Data fntopsulotion.
InheianceCoabiliny ck Cne lag+> i s a e
a Celection ob homO-
Class oh Hhings to Ireleait Qnoten enedUSabject.
ingss elled Data
Clasob
9 benetits ksssa Derueoo x
Jnbutane, It pövicbs tseaclehinonmposie luta type

4 Uses a Keyword clus Ho


olecane a cfass +ype variak le
adassI 4 is e
Obgct t bgt is on 1nstune at an

chencteristics edUE &ghavi


lawing Some

O lau ok pnetics
Re iusakttit4 o Cal
Lau traSHi e

Ddulani
A tartope application.
Amactule is a pion on an n
madutarfty is dc pUCOobhreaxm9 aVerge task 9nto
alA nipacts thich con è handicl eaiily
7
maduuasity_ Ecduce_Ale compixity t an_plicatiin

apiumghism an4-
4 s Acaieol aom qeek ord
polymeans Manu
monhism neans tunction.
messaqe 1S pAsed Ho dleCEeEnt ibxus t _
l e n Same
i s Calied
Same ciss 1 acs dibBEXEnHlL4 L i COncepd

Pokamaplism
wen ae betucen tup numenal Aadds
LSeppexator
t3-5
A nwmberr mathematcallyGre
Ahen dhSame Opeaatod s uscol befueeo tuo _chaductns
Strung COcalatetu6 Chaxack Sirina i- n-
Cr
1he end ok_hatten

JAVA TO KENGA taken S a Smallest taut 0h e ecu


Prcqsommfnq
Imay be. a_ond 00 Chadactert 0x aymbO
ahschsao
tosickaapxnqaame
(D e diieent puatakens ave koyul@3-
Ofesatur )Jdentitiea

puNckutios ) LHesal Cena )


a ase eined7 ndCined nsicle
C
Cestein mean
nua tbrang Un tkrady hasinq
Can be LLed as ho8mal tWortd,
ckc biA

As he 2imeSiutts oontifirS ocalionn memory


me uriablo to hold avalue jax ca fempon4
paiod

tShoutind br akegiuortd,
ege must b easton_alphabet
ony allow as ie peuol Uxacten15 noks sCosEt
Sanid Coniain any blank s[ce.
Uppr_case & owen case ae_drsternt
VitShoLidn4 Strut _wh a_numbN

Heroi
LSHerals O Ahe onstaot6 /hn4e value alMains Slme0 4

t Con_be classilicd îcta cisheaentdupei hu ae 5 5olloubs=


ZAVA CONSTANT

IuhE RICc CHARACTER


CONS1AN1 CONSTANT

NTEGERI REAL CHARACIER| 5TRING


CONS1AN1 CONSIAN1 CONSTANT CONSTANT
Ex 1Q4 EX 4.3 ExK Ex AKM

sLape5LqeNE clanacdor BaLk auia Aidakn Constant


A New ine chanacler bakspaLe
9 T0h Spae " NYerAbhiJet
6 Ctiage 3eiuxn

TE RATER ComputeG_Omo
415 Hhe5Decial Symbo? wich fnsirtuA
Opemoetion to pertbugm
i s he OP-code pr ob an instruAcHiOn
Isinucion ).
0-ppde Operand
luha fo Lwleneto
do do?
AriHundtioperaker,(t
Relation
L0gical AND on, NOt)
Unary Ct-)
Binady
Tennary- 1
ym Lekt /0Rglt Sls_Oponolets.

AVA( 1981-Jamthyaunh-1211(Boomfied,cokosaelo, USa


16 on objecA Orieneol piL
nitialy *vdas mmad s0ak, langunge.
Davelopa Sonmlcruo Sysem Company laaaded lay tame
noxttng
neds 0 v a compilert & Jawa Enterpreter 4o execute
a60usce codo.
MS DOS
WYrdow5
Java
- Unio
P%09ramme Compilary Code
Soyce FOher O/S
Code
JwaC JVM
Java intue macdhne
atfortmudunent P/1..

eahes_eolu Compilcr & ntenpactrt


B s aobtust p/L.
i s a platloam., indepenodead p/L
) angag
4 1s a mlithtadarangag
c a n data aom a Kocal oystem&faorm me.
a a ase Sensitive anqunuje.
8 e e Can Create 4pketa ptatiorn fe. Hhe powgramewlui
unGn 10b otowsert
Qnu Creating ah appiation
o) Ewru au qaimme s wOAten utLn a class.

A 10kanî sa_SmalleH pat Oh 10Na oogranunding

uncuciox i , L)- dall6ymbols.

0)4s Ahe pecial byombnl Cllart tlan operaterc uhich ?s


MOSH CoMANanly used 05 0 Sepasakerhlueen.two Stateert
Mlues, ariahls elc.
h e dhexend punctuateS-Ane,43 C eta

KUles Oa wrting aAyA PongranMC


JAVA aOqramme Consists Oh ome os niae Clas.
ACh SHtudemen mustenods 1wHN C5emicolos
o ) Crne ok_ckss ShoNd LorHain_a unction moin C).
Th0 PxeLLHion 05 4he Drogram Starts aom Mcun C)
V 4 USes 5ome ionpost stdteme to acces ileotbberont
duntion 1ed insicle Souore Code.
Uses braces 2 to Specily blark ob Stalemenis.
ALL A iheiahle must be bekor its se
YShiqkly Case Sensttve mosdy H OSes Duer Case
Clphabets
Ix) It mUst be Swed RA the ExlensTon AVA.
X)Mepabqram Should beCorped be-dore: feun.
ex inmpost Java. DHiR. SCamnon
Class 1est

Public Staf¢ Void masn L)

Stanner SC new ScannecSystem in);


SystemoUt.Pri value ok 2is +) _

inuduse O AVA DIUgram


Dowment Section
akage Stotement
Impod
nenfae 1 1

dNagg olehition class vnniobles method


MainMain_mekhod.
n-uethds Cnd behavioU
DOcunanH_Section
4 an Impoatant Section
CpAinal. nchudes
06wpanqaomhouever tS.
Lasic nsoa aBfon
May fnctucles ProqtamoeL Dame, Be ohlhe ogmam
name cneaftn,
may be a Gingle 0& MuHiple R?ne.
i sÍ sed sox Qvin Comrents utlin_ ine
doa Stngle Cre Cohnmeni Lse a parqaamoe
Symol7Muipe
Kine Comment L5e aSymbol

UDate Ob (reator- 5 , 5 .2005

Fhckag also OpAinak, t ls sed whon Sousce Cade


is Statemen s
Uses kesen pacKoqe
Consts 0b nyclassec
4pckae

mpot Stafcaent
heaCkerent A
> us skchiom s Used Ha Cnece a Ktnk
Coc
Classes w h Lbrary & SoudR
? n Opkional sBadenent4
Aer face atenent
bet 5oue Codo& JAVA
M6StakcmenH Cnenes an lotenface withdien
Inhertisence to caruuyout dlteaenk Cink
PacKage
tHOuevert 5 0n O2hional statement
fas olekcthion
ava pngaamme MUSA howe Cdleast class oobfotion
Nertu .
and ore okhe dass NAUGACnciaio tho unchion Mean.
closs Vriahles & weAd
cdeblaotion variables lnsfcde Hhe Clasr 6 Called
Memlen dunckion,
dala memberA_melhods ae Cculled
Aata memben6Y0Membez tunci=
we
ruCy_ nol
A Clas My o
in Meod
veruy AVA puogdome uugt owe aMethod (Surction)
Ver JaVA PLaycam
olenyin!C) he xeution db rhe
stands xum deuain -funcin.
Aeihodls& LehauuY
whee a Soune
ueAVA PDgnae wkee_a_Soune-
41s dhe building blocK 0
is debioed. USes clnkeren clataDEMbenwnr lunchiòn
helatemeoks 20 fox le Souace Codc
X Ths poqram ods e Yuare

aD0 a ven Dumber*/

pooqram name la jaMi


Jmpo jwalang Mal

Publi Stotic Votd Maintrng Ag L

055
S2 Madh qa W
Systémous Priod n ( Te
value1s45)
Argument
f6He panameBse alves paSseol fo a tuncHon.
In dheCtbove
poqrcams4sgs i a Slring Arqument ie
Orqumead o5 Srcing dye

unctien Col 3
functin odes
AcLeKs Szecities Hunction decdarasby
15 a visihiLity Twole ob _clas 0x 0
Taua Use yhp a dunction.
publtc ACcerspeikies
Privake
PrD¢cied
( Deboult
4hauld bemoteo al he nain
declaised 0s pubi So hat Sadd
Iaaudd be
Juction Main ny clas Gan_acces ie
Ex publte Stotfe uoid Htung rwaloc1)
s akesuorodOh{c Siqoisies -lhcede twtion euun ()
n04 bestaickea lo. a Sinylahec& 1 ualo he tox all
the octs o hc clas.

g dekioeG te netuon ue ct c function 6àundion not


aciurs any Ualuc wo ihsulel use HhkeywanaVoie
R e u r s Sme volue. Hen espectie clata tupe duek{a
kkined ivae Hle undion yoinC).
xdoMainC
Ts Mecuns eunction ain) deduan n fntecgn value

DALATYTE
aelaatis Daiatype &glain alitont datatypcs sea{ in_1ua?
AAdaa dype dekina dhw dqpe ob Value_a voriahla ton
holt. CanCan be dasstied foto two tyre d ane
`nlk qatertyne Composie atgpe-

isalso calleda uodamontal ohtahype.


% 4ke basicohiahytes o a jaua Xangunge
otfoatchar Strdng ek
S Composite dadakupe
9 sako taned cs deived dasadye
4 s derived duom udamontal (aye
3a Special pAopose dastkpedch Can hetd aset_o
Sinsior o dissniorvalue
X Acmy Struc clats Lnun.etc.

au lo decla a Varialke
AAlhvorüahlas Must be declaned bekoat s use,
A suiakle can bedeclad wurhe help ab 5 Chtad4pe.
Syn*an
Lot YZ3-
duplay Jhe
h Hx 0 A
ex Oa 4
tunchions do dsplay
dwo
A Jwa Lases
yaciablcs They ane
vlue o6a
dSysko1
l t pafotnC)

()Syskm. oud. printC

dhe contrnll to new ltng


Triotkn)- rtcnske whde.u piAC
prdn Hhe Outpxu
Cushen
Pafnt h Outpcef where Hue
awailahle.Tne 4 doetnot dransse
fS
be nOkd
4shoulol
t t Contrco 40 dlue new Kine,
înOrdar do0in talo Strinq or tw) Vni
luat
we202uinoa a t)ppexudor

Area d 6 a d e
rtc_a un moqCam da ffnd due
navinn Mcius1dCm
A ImporeJaa.fk-
clasaa eHe

pubisc shatiuoid main (StungAgCT)

314

Sysem.0u. PrntArea o Chcle taea):_

Driie i0 JopscHtay do Aind R clBplay dLgAea dh


a vectargle having lengh 2bcm &bzudh, 5Cm
A Iopord 0f0,
Class TOH
Ptbt StoVad Main Sting AxgsC)
jo , b, ana

b5
Orea rb;
Sytem,OU4 Jeint ea oh aecdangle is=t 0vea):

s s Useq do iind le pout ob 0iven


Hundfon
unerdc rprestion, HKa Mathernatical danction
e Co-verpording 19knany 1. s ova.i
Math
U5ES dwo arqumeHs hence Calhed bmarp tunthion.
dituduaoa oh
m Por Java lang. moh;
Cico Trgam ay Ra)
importt0wa,co.
dass Fest

puic statio voi mainSig Args C)

lood Onea, Pi3


-10 -

P1 3u1H
Aoea= p1 OtM.ow [0,2);
Syskom. Dut,Hdrt "Avea ah rcle-ist aaea);

You might also like