0% found this document useful (0 votes)
15 views

Java

Uploaded by

gargsnehit141
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)
15 views

Java

Uploaded by

gargsnehit141
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/ 23

Date

Expt. No. Page. No.

Aim TDK InstallatHon


on UBUNTUWINDOW
And Nuiy by ma k'nng Hello World'sJano
pro gmam Qnd t e t thsame by Uling
ONQ C And ana Cammamd

Ste
H t ,t upolade the apt Pactage inden with
Cammand lud o apt updo
onee UPdate instalU the DK wth
Sudoapt nstall default-jdk.
3)exiiy he dnitallatian by runnin
aO Vertion,_

9+wil| intthe Vertion anaL


in talled..

Code

Clats Main
Publielaio Voidmaintrlng args
66
Sypdem. Out. printin_ Hello woild");

Teacher's Singnature. ****************s*s** Gcolorz


Date

Page. No. 2
Expt.No.

ATM Consider USex ho N eq9 hn


the q9- Qo
diepla+ qroi and no. a
144 ea9 ma ke one
n_dDZen Lgq moke ne do3d),
he n e99 Con be
inut om Contole_lhc Proq ram Should
dipla4- bou mny h o u Qaram

Should diiplay hou) mans aoS


mansdoden ho mdnu etoye
hou
ONer_haj.
egg
CoOF
IPGblie Clar ega
PublteStaticVold main Stringongs S
int egq-indege porte Int LargJ Co
n t qross e 0
In ao2en O
in em O
Lgq14 t
QroS
Syuterow.println (** Grot 9rouli
em2 e99 9TOLs* 144)
do Jenzrem2
SytemOul.Println * Doan d oen);
910 144) Ldoden a 12)
rem gg
S tem. out Pintln* Remtrem

Teacher's Singnature. ****


Scolorz
Date

Page. No..
Expt. No.

Almaet two numbers aJ inpudrom


wer theoug Console and Sulap the
oo numb er N ith o uu USin
Value 9
Mariah le and dicplau the
temotay

Code

ublic Glais SuwaP.


Public tatHe Vold madn Siringo1gt
int a= Integu Parst Int | a 9 o
tI)
intb lnteq erarielnt Lorg
aatb
b:0-b
a ab,
y term. 0 uyrint In a ) ;
Sytem Out frintin b )

Gcolorz
Teacher's Singnature. **********aa*******
Date

Page. No.
Expt. No.(

Alm Tan Slabr fo gneral O to


No to
S, 0o,DOD loy
above 0 0 , 0 0o
30 da Lob Lw onmem

No tay, L,ao 000


to
S+00, 6020
to_ o 0, 0ouo 2 o, Above_&0o,000
WYite_ Mademe nts
3a'
Ochiee h i s Malce SVre Laden 1
the ladle So th reareanlo ble.

Code
Clais Tax slaps
Qubllc Ctatic Vald mainString org
Lot intome nteqe Yar s nt (orqsti]
aouble tor 0
Cot egoryAQUalu 1gnose Cote*gtnera"
i DSntom 88 nco n 18oooo) 12
Tax "
Syém:0 u t P i n t i n 6 l o
ele 18o 00/<inco me A income 2 JS0obo9
ta ay do.| income
Syttem.Out Qrintln Fan : Ittam
S0000 ino me 8 i ncome bao
ele i
do taM+.2
inome "
6 :
SyLtem. 0us,intln fam = dax

Teacher's Singnature.*************************"
. Scolorz
Date

HExpt.No. Page. No.

etse M nCo m 22noDo)


aM tant 0 3 ncomne
tem. ovt. printin tom dayl

clie Categ ory, eg uals nose Caieomo


|
00<1nCome 1ntome_ o oo b ) |
S3 tUm Oul. P1intln 6Jo tor)_
c ooalk income 84 mCome ooobo
tay to.| intone
e i em au.rint ln ax
ame L 8o ooo) 7
ds o o oo1C incorne &int
t a n z t a n t o.2 InlomeA
SyCdem 001PintlGloa )

fUe in(sm 2&0o o


fam a b3TinCme
Syse ou. puintln io

eA
Susten. Ou. intlo '6nyadiCotelar|

Ecolorz
Teacher's Singnature.
Date

Expt. No. Page. No.

Pi _To Ceate o cloJ Ca'led


Cal cultor Loith_ d eent Odd meha
leveslooo he method Lwh_dteren
Yaram e

Code
class find i
lonq addind a long b
retun0t h
n t a ddint i b_,intCE_
etuin 0thtC-
doble adddauble_a double b double C)

Yetun_atb+ C
3

a Colculfor T
obre dotic Uoio majn | S11ínq ora
Hhd ob heuw ind U
on :05j add ( 2)_
Sqiim. 0 01.rint In n _
Sysi tm.ou.rin t nobj.add L, 2,4)
LS4Slem.0u rintinDh add42L,31
ste oi.2ri0ln- obj.add (, 2.43.P,

Teacher's Singnature vusnansesne******* Ecolorz


Date

Expt. No. Page. No.

wAP to denonStrote Conce pt me tho


OVetdna irq dyno m iC methoo
UPaC DynamicYalymor Wim
Lclals Yarent
Noid oe play 1
System.ovi iiotin Parent dtsploy

vaid Phous )
Sy fem 0u. Priniin Porent Phou"

clalA child Ertende arent Z


Nakd ol fi playUi
Sustem.0us.printl Child d play)}
Vad fun (
d ut iintln _child_fun");
2

13
pblSiairVeid man (Strinq orq S )
ane ntabi: neud hiId ;
6 b . S how )
Teacher's snbnature Gcolorz

3j
Date

Expt. No. Page. No.

Alm 10 m lem ent Conc e t


a bs tro ct elo 2nte 1ou

abr dra t l a ) 3 b an -

ab dro intget ko U
Noto dtep(oy C)9
Cytem,ow intln PBT":

CLajSBT e xiend Bank


int Qe t(LoTON
ye turn6 T

c lassHOfC nhend Ban


intg t Koy_)
teturnC1).

eho )
PyA em. Ous.Pi n"HDA : 3

C o y a h i t e tdemo
yTHe Shot'c Uokd m on Sng arqe C)%

oo C a b s Nu
oel new B TCL
ysten.ou.intlno h qet oT ( ) ) |
Obj'Enew Hpf

Teacher's Sihenature *******************a***


Scolorz
Date

Expt.No. Page. No.

ads o nder fo u

loat z31t
fLaat End Looda Looi b]
eta Pecjonge mplemen taton oie o
oblic floof Pnd loa1 a l o o t b
Tetun a*b

lo s Crcl fm le men ayo


beloaHnd (1o ot a ilo at b

clas Te d
blic SAot Uoid man( Stríng arqs
are o -neso 6e Conle C_

Areoobe hew_eirc
|Sqs lem. o uw,Qindlo Are a obind|Jo)

Teacher's Singnature. ****** ********

Scolorz
Date

Expt. No. Page. No.

Enperimen

|Am wAP to ho nd te Ence pHo 0tng


y Ono Coteh and i n a y no ereoHr9
em Cr fHon ode.

Class Tesin4
n t dUw oAInd a) throws Em CeP Aon.

a 6)

thro nen emce? Hon ( 8A! Diwd by dero|

ese

Tetu (2 a)

alasTesd
Publie s4aic vo man Sring araA CT)

lsin/obj muo Tes tHng O;

int T o bi. diuwde (o)


System 0 t Pvint In(66ut Put tr

Teacher's Singnature . *********************** Gcolorz


Date

Expt. No Page. No.

Catch evceptione)

Syutem.o w.indtIn TCot Ch


_CotCh Block
Sysdrm, w. Pr etine

n alLy

y4dem 0 . Pintln eait 8y

Creatin y ou oon èneep Hon

elo JoMatCh fn Ence?fhon


S4ring mSq

1DublicS4rngto String()
etuT

ala mateh
eHc Vasd mot ehing (Srin Sty throus
NoMoih EnP )
i 8tr g uaiA 2g nosse,Case.6 Ielco me.
ttm. 6ui, PintIn b ma ACh ed
Teacher's Singnature.***es*****e******a*** Gcolorz
Date

Expt. No.
Page. No.

hou ned No mateh n No match '1:


publi c Stahic Volod main Sdrinq darqa)

madehing 6 0 wy')

CatchingNomateh ep)£
Sy deyo .prî dio| e

Teacher's Singnature. ****""*************


Gcolorz
Date

Expt. No. Page. No.

Enpei tment-&

ed
A To dmons drate h e ConcePT od 04
deina4 ac tcog win9 llouin q
Cre o e a neuw Po]ed i
nomed any
LutsC Creoe Pactoe
Create Uarious Clo leles
Onina mthat
ien, moncey and leg hond
liee
n eoch_eais Creot 4
dalamem berf e e
ard g 9 e. Creade mehd
olo uwejq hst
Ute 1g Vegeda«ian,Con cUmb 9etSond,
reate Onohen oje t and n
od tor u
o Ov e ote a o l o J _ Coll ed
A n d oNeate_a
Olass loued Vandalur
6o
Qnd ereate OoecH for onimo
tho ae o and Pk1n
haq cterish U e ach Onmm
the

Oed rior,awa
Poctoge drimal po Ct_

ivatte
ilo wet T

Puuie Lion dring Colov flo w egu


nage

Teacher's Singnature . J
********************
Gcolorz
Date

Expt. No. Page. No.

uste.ou.pritn" Hon Colo uwe)g ,


"

nd 0g 4"tColoret' fweg u
no

boolen Ve9eari on l I
restu m t o oe'

bo oleon Cam ombl


Tetur n fae
Dublc Sirinq 9
Teturn

epha 'pauo
elepha la
o c r o g e animod gPa c k
Dubllc c o s 3 H e P h a n t1

Pivoe ing Colo


Piiyo flo welgui
Oriuae
Qublic Jep hontSi'ng lo l0T {loot
iht _int age) ~
tuus. Co or olor

y tem,Ó rintln Flephont Co forwelgt


tcolor

Teacher's Singnature... **************** Gcolorz


Date

Expt. No. Page. No.

ubliee booleon Vegetarian )


Seun

Lb lic booleon Con cmb C) i


fe urn
ub Iegl11ng T und CJ2
eturn rem Pein9
Jandour Jo 0 ouLg
a ccoge dooPå c e
m p o r t anim a Upack,*
AlaS andolus o o
obl'e S4o ic_Vod madn/ Sing or94)

lo N new L|oN OBrownl,oo . t /

Ssten. u p tndlo V gVegutortan (


Non .vegetov o LloN,
oL e Uegeort an ,
on )
SyStem. Out. vj ntlo L Can cUm b C)z 'yeb.
Llo Con climb Lto.Con'd mb
LSsiem, o uPipfin Lion Sound"+L.94
SoundO]
bmw
e h ant e =neuw El hont6 Dor
2S63
ytem.6u, uindtlo e Uqe-torio n) 20au
c etorian
efhanl, non ucqetarfan

Teacher's Singnature. ***************n*******


Scolorz
Date

Expt.No. Page. No.

Ketem. o dPindin Concsmb


FLphanf eJCan lephont Can'+ Atab )
Sst u.íntIn t2ephont Coun
Srunol (1);

Teacher's Singnature . Scolorz


Date

Expt. No. Page. No.

eime nt-9
Aim LwAPto feote three hseadj Ong
o looP to_ ( o and tiliaRe
eep Qndo them
ponier Luw't ch m9_
undeA FRead
metho o
Code

Cla ss A entendj Thread 7


Qublic Votd run L
orint i ettc ittS
Stem,ut.py'mIn
6 Ai nd
Ihreao 4ielald " ;
Thread. d OL

qtem.0uk,_ Drlotlo_ 68 A t1)

dlos eyends Thre od

o iny

e ou sintlo
66 e cono dhread",
Teacher's Singnature. *******
Ecolorz
Date

Expt. No. Page. No.

Calchinterropted nce2t4 one)L

y dem Ou. p B-

o s C e ntend Thead 2
Puble asta Tun ()
as (inttl kLeS te1)z

Siop C)

a s muti h r a d t g
Publtc taie yosd Oo S4*ng arq

AL neu AC

iayt C)L
3 . t a r t C)
,8 tem. o u,4ntlo _ 6 8ye--");

Teacher's Singnature ***************


Gcolorz
Date
Expt. No.
Page. No.

P-1o
Alm Keaolu'nq and wiHnq glota wing
the CharoCter Stre anm
roro Souc
deshnation ile
Codle -
mPort an a. ip.
clais Copy file
Pub licStaHe Uald mal String_arqk CJ
Eil An: neð fle" source tx").
l od=Des file o o utut. +t":
file Reader {r= nulli
Hle W«i ter w null,

r n u Hle Readen( fin):


me File Writ ou
nt ch
while Cha fsrad U)! =1) £

Syltem b , intln(
Cheek Ple

Cotch Ece PHon e)]L


System, Peintlo ( e
naly

Teacher's Singnature. *********a******"


Scolor2
Date
Expt. No. Page. No.

u. U oe t)1
CotCh ( E ePH ne) L
sKm bu.grintln)

Teacher's Singnature. * * " * * * " * * * *

Gcolorz
Date

Expt. No. Page. No.

Periment -11
A A to_dwdnP Uent Se
Communi Cation uU ing So cke o 9a fomminn

Code
#mort anua,io,*
import awo , net *_
Clats AN e L
S)I
ublie Stotc Vsld madn Strinq ar q
n PoRT 1234S; nt
n u Sevver S'o cket(fovt*
Servt Socket Sekt
Sustem, Out, 9tintln My Sever Started"
System,0 us. pr'n Port"Ss t . tlocal
Sugtem. 0u. rntln w PovtPovtc))
S ict. Ket,oThme o utSoo 0o )
Soclcet SetE Ss et acce Pt
Set
Sysdem6ut. rintln_* Yesdone"t8et)
kuered Readr in: newbufered Readr
heu dnpuy streom Reader S et. get Jpud
S.eCO
Butered Rea kuboorde ne Rufeed
Reader (neu dn Pud 1reo vn Re aouyeten
neus Pvint wyit (f et.
int UUritu 0uut
Q ouutStreom ( , true
ino nul
do
Teacher's Singnature.. ***************
Scolorz
Date
Expt. No.
Page. No.

S= in. tead kine ();


Sytem.
gt kq 0u.PintIo voo iend"a )
wotd. Tead LSnet)_
2Pront
oeU9t1. eq uo Tonore Case 9wf
Catch Eicepon e)f
System. out. Piot I e

t i o Pot aa, o
Ctas Ce
Poblfe staHc Uold main (}S1ring Or9s 2

19 7. 0o. 1 ' .
STin PoRTT 84S;
Sting
inaint u34
Soctet Skt=ne Socket(iP,pAF_
Sytem.oul, r t i n | Client";
Su gte0. gd Ptit\n * Port;" fSLt qetPor)\
Stenebu Paind1n Joo ort,+Set qet
em, duT.Pin write loc Po r tCS

Etered Reaalar In s heu uteed Read


ne2nput Ste Dv reaowst
wtg)
Teacher's Singnature .nua.in**s*s*s*****a* Scolorz
Date
Expt. No.
Page. No.
-

6uerd Readw Iceu uinvd n e 6u r


Reaour nu 8nut etre o mReadlir(g4.
nT UWritten Out neu P: nt Wr t e r ( S .

Siinq Mul
dot d
Stu e Keyuwondfead ine;
bud.riHn 041)
d1 in, Te adl ine U
Sqtem. 0 ul. 'intin sor Sev yicc 3 T);

Loudle 9tr equ gnocCas qwf)),


Catth (uhon c
Systdm. ous ntln e

Teacher's Singnature. Scolor2

You might also like