0% found this document useful (0 votes)
10 views22 pages

2 Marks

The document discusses Java programming and data structures as part of a computer science curriculum at the University of Madras. It covers various topics including Java syntax, classes, methods, data types, and data structures like linked lists and binary trees. Additionally, it touches on concepts such as multithreading, applets, and package management in Java.

Uploaded by

DURAI RAAJ
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)
10 views22 pages

2 Marks

The document discusses Java programming and data structures as part of a computer science curriculum at the University of Madras. It covers various topics including Java syntax, classes, methods, data types, and data structures like linked lists and binary trees. Additionally, it touches on concepts such as multithreading, applets, and package management in Java.

Uploaded by

DURAI RAAJ
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/ 22

lOMoARcPSD|31886189

Java and data structures

computer science (University of Madras)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by DURAI RAAJ ([email protected])
lOMoARcPSD|31886189

N .ToN BLAJR

RopNo 2220o7b2

-O9 2 0 0 2
D.o.B : 1

Sec :11 BSc(es)-B


Dtd
Subject TAVA AND DATA STRUCTURES

Sub.Code SE23A

enteCade: 472

Date : 12 02 2022

Sesion FN

No ga 20

SignatureJ.To Blaun

Downloaded by DURAI RAAJ ([email protected])


lOMoARcPSD|31886189

Ray No:2 2 20076?


Dp BScS) -B'
Cawea |+73
S o SE23A
. /074 Blau

PartA
Java Ccyuln Trarslals Sowr
moyiam
unlo inhunicia Code alld b
Cocle. T byueced s eed Jana
Vorluas Machine lsvM) and JVM CorNely
th byl nlo nawe machin Cocle
Hena Jaud Callhd
nlalern
Udyancen languaas ecau
he depndud any parhalan
haudwa ofuaalrig Syplin

Fundicns that duclaud be


pau las Calld mlhcdy
Methcs au daclarud nacle bedy
othu class afun the dclaialen
data mumley.

Thi qwruro
mal dlafnirg
mttr mlhod
Downloaded by DURAI RAAJ ([email protected])
lOMoARcPSD|31886189

No 22200762
Dep T Bsclcs) -B
CaNol)L73
Suboda:SE23A
Si Tomy Blou

suuvnlyn muihed nam (panamln kat

bocly mthod

Cla
Cla akuptint Oiut an lanu

n tmplal on huh las


oiud ualld

:)Clas euyn Oljut Juol


Simila wsd

iii) Class ysal


|ent erilly
Clas duclnud 0lit ualc. mary
apen gumut
vThau Chun a many ways
to dupin dou |t OLale oit
clo Suh c
wng
Rey uod don ) mulhad, te
Downloaded by DURAI RAAJ ([email protected])
lOMoARcPSD|31886189

(3
Roy No 2 2 2 o07 69

Dap BsccS)-
Con.e_ I473
SLeea SE 2 3A

SipnJ Tory F la

thouad clas the Ca ahg


PacRag alMas lo Oua Ond
manag
toruads. ha t uo o Uualng
trwad ava
CEilndug
(i) Amplumuiling
clas Thtead
hurnalle inlurfas

5aa Lovuduu bult-in sqyiel fo


multhruadod piaynammung.
multlhrundud viaynam Lonlans wr
Mel pars that Can wn
Corvcurnlly
nu,mulahrtadng specialimd
Mulllohing
6. A SUuam palh COm/Muralion
beluwan th SoUT and duslunalan of
dala A SUuam unhd
aa Ilo SUuam It
hypvcal
duhrud
by uo yyu
stuam Byl SUta
nd
haracla sGlams.
Downloaded by DURAI RAAJ ([email protected])
lOMoARcPSD|31886189

Ry 222 00 76?1 (4)


Dapt BSCcs)-B
Cantlo 14+73
Su da 5EZ 3A
Sipn Torey B/au

7. Apnlet
Small prloqiamn
divelenue lnt apnliealiu Arlat
a embrddid n HTML douumuds
Arpkts Ulogrram Can be un urg
Uel
owsen vwen
Cocamyle ,uuhun Jaua
enhanu a www Page, the
yawa Code
embeddd wlhin HTML Code It u
Callid as
Applet

Arylicalio Stach
)Evnlualucn Aiubhmle
ii BauFliackng
iii) pelinihr en
iv) Kuveu a Data
Chuckng
V)Prewuna Funcian als

Downloaded by DURAI RAAJ ([email protected])


lOMoARcPSD|31886189

RoNb22200162
Dot: BSccS)B
Can-de: J413
Sb.wda SE23A
SignJ:Tony Blau

Binay yne non-

urivan dala sbwduru That a

mainly sed seriling ard


Seachung
becau stio daln hiwronwhurad
orun.A n wtuch each ncdh

(panurt ha at mo huo-hildd

nordus (ult and night calecd binary

/2. k inked ist Can


dyerad a

Colectie otucs callucl nods


bhat Unandemly Aloud
A node Conlaris fld i. daa
strucl a that Pariliculan avddus
and th Povilun whuch Corlaryt

addruy th red ho th
menoy. h lasd rod o
Jst Conlain Ponln th null

Downloaded by DURAI RAAJ ([email protected])


lOMoARcPSD|31886189

RayNo: 22 2 0o 7691
(6)
y: Bscs)-B
Con Luda 73

Stoda5 E2 3A
Spn Tony Blauh

Pat-B
13 Arnlhmde Uperader
Andhrda owrdlers wud
perlotm
aruthndt caluulaticns, huy Can wclk
o leenult dala uyu
Sawa CXLunt 0 BookLan
Ardhmlir uialeu Jaaa

Opetalers e Tamle Eaplanolev


atb Additien twe huanlau
a-b Sultiastien tus numbeu
a Mulllicoln o e Mumlau
a lb Dunun o u humleru
a.b Diidu u numluu
and the umarve
(M.ouloDuinidn

Downloaded by DURAI RAAJ ([email protected])


lOMoARcPSD|31886189

OR

SD

Downloaded by DURAI RAAJ ([email protected])


lOMoARcPSD|31886189

No22200762
DeptT BSC(cS) -B
Can. Leda 473
Sucoola SE23A
Sign Teny Blai
peialosl
Mearina ealanalie
Position and alse ugnves
Sio
Ze Lere S bhu bd o
Pruht shil Mumln teuwads ight
speiid lumlen
Poiion
ond d Ste o(Zene)
Si
Bilui niuve bu Comlemut
Camnlunut nunlan b
chngn o's as
and vtja

Okick basic urt


objpe- oziuntd Uieammng .0lje
a cuntlicd Nugu Nams

An obsct nynsn d parlaula7


Downloaded by DURAI RAAJ ([email protected])
lOMoARcPSD|31886189

RNo222007L?
eytTBsc(cs)-B
Con cada I473
Sulcada SE 23A
S T. Ton4 Glau?

inlana class. Thua lan be


mo than unslana a otjut
Each Ualane o ot Can hold
ukvant clata. An
Lellertuion of data mumles and

aMouald meb mumben


unlie alse
Rnoun muthods

Crualurg dzuct m Class


|A Clas Can he yed
an Uianne o the clap Calecd
olpct. Cnalig otreet mias
allccalng
munory Spa alloisds . An
otic lalud Vta the fUaten
Sylas derug an
a follous
Clayname
otur-name;
Our-nam niu daoname)

Downloaded by DURAI RAAJ ([email protected])


lOMoARcPSD|31886189

Ray Ne2 22o07b8 10


Dop: Bsclcs)-B
Can cada473
Su.coda SE 23A
SiynJ Teny Bla
amnle

Emploga emn
Cmpi=nuw mloyuel),
Can Gual Me numlen eis
tolo
Emplays emni n r Emylayul)
emnly cn2 Vr Eloyal

15.
A
Porkag
Pachags Can
dahirud
Similan
tyw das,
nuau , enumuialuon and Su- packag
Using packaa ecom eaui
Jocalk nuald lays
Jua
PacRagu lassilied onte
ys Thay u

i)Systim pachag n Jan API Packaga(buill in


paukags
ii)Usen dtnud Rackags
Downloaded by DURAI RAAJ ([email protected])
lOMoARcPSD|31886189

PyNo2 22o0768 ()
Dep BscCeS -B
Concuka: 14+73
scode sE 23A
Siyn_I Teny Blau

Crualin4
To OTuale
Paukag
an
dobinud paukagt,
urchud Command slalunnt
ava
S owe . We Can
ayug
classe and
ulinhacs a

o Parlculan packag b wng


C
pautag s alumut.
The lrurak romat
package. PackageName
the
Hee, packag Ryut ld. packageNama
thu nam othu paukage Lf Jou
omit th Packag lalmunt
Sowu clayses and
ulrlacs
awle p.larid dopauld package
tn Unlana ollenivrg
Calloel
slalemun
Cnent packaae Lcmyutun
packags ompulur

Downloaded by DURAI RAAJ ([email protected])


lOMoARcPSD|31886189

Ryo222o07621 2
DytT BSC(¢S)-B
Can caeda/473
SLcoda:SE23A
Sip ny Blauz
1b Diuun bewn arnlil and anlicakom
ograms Joa
Applicalima Appluts
Sava anlicalun ununally Jawa Grdu Qarunally nulen
nuer an alicalien t Small anld i.e
tha deugnud dusigrud r
stand oLore wL Word Wid wel (Www)
i SOun arylicdliemu do n Tea Jana ayld uqunu
eniua viw ah. eainal vwen
ugu ou

thad te
pLayarn. Thu muar Gqram.So

ou Can exiau a
aylyot
owa welr

anyliralic diudly usingbYewsu an

uluyvruli wUi

7ii) Applicalm Cau a s Applt Cann


Local hle 5youmt Ural hl sytm
and nd uscUs

) Crualing aund urungCuoling and wnurg


aynliralon Camlr

Adhel arylicalin Authen


Roun no Rnoun
Downloaded by DURAI RAAJ ([email protected])
lOMoARcPSD|31886189

Ray No :2 22 00 7621 (3)


Dyt Bscls)-B
Cancoda 1473
Subcede: SE 23A
Sy J Tony Blan
Appluahons Applds
Aplications Applat evet
corlnol wen
driwen
18.
Binan Ravuralina
A binay dala SCurwu
nyvuluntud
Uung mdhods

1) ApUay Keppusuilalion
durkud List Repnusunlalm

Conaidt otloururg Sinay


anyh,
(A

Downloaded by DURAI RAAJ ([email protected])


lOMoARcPSD|31886189

o:2 22 0676 3
Deprt BSc (cS)-B
Cun LedeI473
SJcoda SE 23A
Si .Tcay Blain
Annay Ryvuentalion
Ih
heymusgrtalion, i
dumniomal avlay(1-D Annay t
binag tru.Thu aUovt Cay
olous
uvuyunluo as

LABIID E F aHs E---H


To enrasen binary ttua o dynth
aUlay Jlyusnlakon, we nud

Clurunaicnal aUay wth Mauwmum

ot 2n l.

ii) inhud List Runruselation


We doull inkd
Jursurt bunany bruae Tt COnasy

uLds. Tn this lnkae


ey tonenlalucin hocde has

olowq SUurwu

Lelt chldDala Ruoht Child


Achdus A ddruss
Downloaded by DURAI RAAJ ([email protected])
lOMoARcPSD|31886189

No:2 2 200 763 1


DSpt Bsccs)-B'
Concodo:1473
Scod: SE 2 3A

Stg:.Tony Blay

lot Node

LBL

Downloaded by DURAI RAAJ ([email protected])


lOMoARcPSD|31886189

Peg No:2 2 200763 1


DertT Bsc(cS) -B'
oncecda: 1+73
Su coda SE 23A
Siyn:T Tay_Blau

Pond C
20
Phoam nd Sum
dugs
imnt JANa.uld.Sannun,
Pubir class Diqit Sm

Pulkic stalie main (Stung anosC1)

unt m, n swm 0;
Scanrun S nw
Scannan (Sum in )
Suslim eut.prünt ("édu u hunmle
m- S.nDu Lnt()

whds(m >o)

S um - Sum + n

mm/o

Syalm.cu.pJunlnl"Sum ofDiqt
Downloaded by DURAI RAAJ ([email protected]) +Sum)
lOMoARcPSD|31886189

N:222 00 76?1
Dypt BSC(cS)-B
(
Cancodle : 14-73
Sub coda, SE2 2A
Sipn 3.Jony Blan

OUTPUT:
Endun th numen : +SL
Sum Diai1s
2 A Laerulh t dulu 0 Panlimla
bst
Stun Start tu ecOulucn
S Tun2 Riad tu au ofn
Stur 3:U oo, uad t
th hcol
ermud by
S tup 2 5tant Om th
Slan 3 Comaru eua elrnui
be U d h
Slep4T valu o nw node
han ot nod thun, t wil
be nte Aultsulru
Sur s:I valu ot
Downloaded by DURAI RAAJ ([email protected])
lOMoARcPSD|31886189

RNo2 22 00 76
Dopt: BSC(Cs)-&
CanCcada. 14+7
S,Cacs : SE23 A
Sg /hy Bla

yuoiuin han oo nod thun, tt ull


be uortue nto Tuaht slstu
Slo On uadhun end nco
tC4 h vou
Smalln nech e
tuoht.
Stur 1: Ruod valua nqula be
dultud
Stup 8 Whu we dilk a nodl, tr
pobili
Nod ltud ua: Simpy
moe tu
i Med be dulelrd ha unly n
chd Coy bhu to tu nod
and dulat. t chld
i i )No to be daltsd ha
hildn Fud nendu Sukcusol o
cd.Cy (0mtnd o Swtol
Nocde vd ddct tha iuun
SuCcws. NDownloaded bythas inodun
DURAI RAAJ ([email protected])
Can
lOMoARcPSD|31886189

Pag.No 22200761
Dopt BSc(es)-B
Cancoda: 1413
Sub.ceda : SE2 3A
Sign:. Teny Bl

alse be
Str Stop the ecculiom

21 Overlnadin Mehod Ovevidiug Mahed


od cUerulodung Method wdug is d
utevu th Sretu
madalild ot th rlonan.imlurianlnlien o bu mdhed

th aruody nriovdd
byr Suyun dass

t Pelemud uthi Tt oCus in woo

claab thed ha IS-A


Cihunitan alalienshin
In mlhd cvedoarling, In mtha oudng
Poanmiln m t be panamln Mu be

dint SaM
i)Metherd Overdenalirgehed widn
an amynl
Comyil n

p okymeyun
Pomeryhium
Downloaded by DURAI RAAJ ([email protected])
lOMoARcPSD|31886189

Ra No 22 20074? 2
Dept 8sc(cs) -B
Can.Lole: i472
Sub.Ldai SE23A
Sn Tdy Blaut

Overuodelinomdhed Ovesuudung amulic


nAava, tuthod aveteadug wn t be
cant be reubsumd by Covasuan

Chanojn l y Un muthed ovwvudung


be mdhed anly
Jt Can be Same o

cllheunt Hou hae

chanae th pariamibn.

Downloaded by DURAI RAAJ ([email protected])

You might also like