0 ratings0% found this document useful (0 votes) 26 views63 pagesJava Programming
Java programming lab manual
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Java Programming (4343203)
To create an object of this class, you can use the new keyword followed by the class name and
the constructor arguments:
Car myCar = new Cax("Toyota”, "Camry", 2021)
This greates a new Car object with the make "Toyota", model "Camry", and year 2021,
You can then call the object's methods using the dot notation:
myCarstart0;
myCar-stop0:
‘This would print the following output to the console:
‘The Toyota Caimry is starting.
‘The Toyota Camry is stopping.
H. Resources/Equipment Required
~ Sr. Instrument/Equipment " Specification E Quantit
i /Components/Trainer kit y
1 —Hrdwares Computer System [Computer (3:5 preferablelRAM | Asper
mrmimum 2.6Band onwards batch
2 | Software: Operating System | Windows/ Linux |
3 | Software Jak 1.8.0 oF above, Notepad++ or other
text editor
1. Safety and necessary Precautions followed.
«Shutdown computer system properly once the Lab hours are finished.
1. Procedure to be followed/Source code:
fe CAS S....Studenc.
Paivedte... int... enmoumento.s
Private. ..ekaing.... mame},
32Java Programming (4343203)
Pubic... Shident. Cink. enxalimentWe,. string
Mmaume)
x
| Ahis.enrollmenttVo.=ensollment vo;
this. nume.= name. ;
4.
Public String... get Mame.Q.
x
Xeluan... name 5.
|
fon
| Pubic Static..Void...main Gstaing cing.)
Student....shadenti.». ew... chaeent C2 >
oho’). 3.
Ly Shudent...student2 = mew..stusente2 ,
S&mmua24,
4 Stugent...studenta. =. new. ShidentC3,
Samucheel3.
tl System,.out..Painthne' Shdent. 4s. name?
toSddemt4...ekmame.))5
System..cut....PaintnC\Studenk.2's.. ume”
4...Gtudent.... jek amet) 2s
System..cut. Paintin.c'Shident a's yacane:
4. Si mame Jet. Mame. 5
4
33)Java Programming (4343203)
Input-Output:
Student LS name + John
Sludent 2'S Nume: Emma
Glueent 3°S nume ; Michuel.
CProgsum Finished g
a1Java Programming (4343203)
4. Procedure to be followed/Source code:
PUNE Cl85.o. REGEAMGNE
“Patvelte......couble..... heights
PaAMCALE... LOUIS on Udid tI 5,
Public... Rectang le.Cdowble....Keghk.».couble.
raids).
£.
this..height.=.height..
this..Mndth.=. Widths
Public...double.... get. Height.
x
rebum... heights
fublic double... getanisthQ
return...\Width,
fublic...Void..... Sek.tteighk.cdouble....kLightd
this height = height 3
PUBLIC... MOidnnSet width Colom ble..tdidth.2.
this...heighk..5... daaida ns.
— oe ie Gora ble.... Concuterte Area,
aretuan.... height, ~..idehy
Sherbic...veid..aneain. Cotaing D.. new. Peasont® Bobs
Pensonz...Prink. ame. C3~
Java Programming (4343203)
go.eRg9)
Alice’);
Bobs
Knut output:
fume: Alice
Mame: Bob
Chregoum Finished
4a}Java Programming (4343203)
48
lisitic... class... static €xcoale.
He = : .
SEE CIM a SHOELG MARA ADI. C ooo T@s.
shaie” Void stasicmebhed. C0
L .
Systern..out...eaintl. Co Tnsid€....Skatic.
MELHOK I. jou =
Bon
Public... Shutic...Vaid....muin CString L..args)
ic :
“System. gut. Printin. &. Welhae...0€.
SHAR CM MIL ABIEIS. 0 wtb MATAADLED. 5
Statictneshod Os
ShaticVeadeable.=..28.3.
“System. oud..Peind ln.C\modified..veiue
of. oe ELC MOARLEADLE..2.0 SHARC Ve EI€.0.5,Java Programming (4343203)
Input-Output:
Value of stuticveniuble + 1°
Inside Stub’c Method #
Modified Value OF gtticvariuble :20
L Pregeum finished J
so!Java Programming (8343203)
Procedure to be followed/Source code:
BVIC. CLASS. ou. Pte) eM.
Public. Gkatic... Vald..rmuincstringllcaags>
L
Final imbx.2. 505,
Fincal..demble..P.2..3.14.5.
Fiano)... MYCKASS.... MYO}. = NE LUL...MY.=
Cluss.C15
Myabj...display.0r5,
dmyobj... Vealwe...5.205
ety witek display Oy
ol
Glass MyClass.
dA MANAG SLO,
a display.C)
srSystem. Out, Prinkin EVeiae eck
MIMO D300
he
53]Java Programming (4343203)
Waagsd
3
&é
COPECCOLEE EHH
Input-Output:
value : 40
vulue + 20
Chaegrum Finished)Public. Class. Sheree
Pubic. Float. area. CFloat..madius),
if
TEAMIN. CAloak]. CMuth. PL” wackias *
Ped JUS)»
|
| E
| om
|
| Public. Pleat cneacflect length, Float
Joist?
| x
Zelu7N....dength.*. widths
ig oe SHH. MOLdmerin CString O..Grgs?
|
¢ SHY pe...Shet PO..F.NEW.... Shape y
Float... SrcleAred..= Sshape-cren(5
Sustesm.out....eznt lo. C. Arca. oF the
porsulsAredd.s
Fleaak.. rectangle ared.= Shupe.cryes
C4.,.6.25.
Syskem..out.0xntin.c Axed. OC Fhe
rectangle... wikh....kgngha...4..mnd. wnidth,.6 2°
bo mectangle areas
JJava Programming (4343203)
input-output:
Area of the circle with radius + F¥. 53962
Avea of the vectingle with length Li ane wieth ¢.240
Cpregzum Finishedd
60)Java Programming (4343203)
clus... @ecbengle.
PHT WOIC cack ME noone @argptn.
Pat V.AAR. ll DE oo AALAND,
fublic... Reckemgte.©
Jemny:th. 0.
fuardhh.
Jone
Public. Mechage.Ctmk....length..).2%..1udidth)
4 -
Nengkh.s.
inhBangh
a, width,
Kat's. ». darts
¥
“Public ink. Calculate ame4.C)
-_ aekuan...ength Sab itth.5
~ :
"Table “class... omenin.
fom pa ie shes Uaamunin aia dng Ca cings>
[a
= Recksangle...sS 402... New... ReckangJe
1Cs.2.3. a
[ Rectumgle..... wS.cheng.le.s... nen). .Rectang le
CH, BI Sone E 7
Rectangle. welult Aectsng|..z...M®
won RECKON.
Sys bern....MMk. Paint bn.C! JAwred....O£..S.9maure +"
SIMYS...CHLeulype.A284.0024,
System. cut.Pxin tn. C' Amed..of rechngles"
echung 12... Culcrteare Ared.C.225 .
pstenn..caad..Paintin.c' Aaec..OF..c.cFau
Ak, Ae faa) + Reckeng. Le. Colahak eared O>;
64|sara Pear
input-output
|Naca of Gtuane 12s
Immccr of weclangle +24
[free of dlefaull rectangle » ©
[PoeacernJava Programming (2343203)
Public...class string Methods Gene,
Public Shubic..\void...smainGstaing args
Sioing...strs." Hello... Waridl
chax...churAtlnders...5....gtr..charAtes.23.
System..out., Primthh © character... Ab LNd&a,
+..GlaerAthadex8..5,
boolean... ombdins Worlds......sSbt. Camksins
Cwwamis” 5,
System cut. Print ha. C: Combis son ld.
+. SomtuimsWorid.35.
String...frumabiedstving..»..Gining. oyma
The....length....aF..the.... Sting. A" 2s.S\ 045.
addy Sb aS kength. C3.
Systemn.aitt. Prinkln armutted...6taing.)5
oink lengtlnof.Gtatng. >be eng ih}
Jpn SY SHOM.,.CUt.Cainctly.C”. Leroy kha....2€....the,
sn RANG chest @NGAHOE.,. HANGS. "
string. ll tends” = str Selt Cn35
jon SYStONNCUE.;,Paindbn.C.salitting...£he....Staing,
Dy A Mila dunemnn eee
Ban. Gstming,..daonds Luce)...
ae
Syelem aut Printing wa
K.Input-ou
<
701
>
x
~
~
~
~
~
—
~
~
=
~
_
=Java Programming (1343203)
K. Input-Output:
{chetracter at index s:
Contuin ‘World’ : true
the length of the éteing “Hello, woald 1” és 13
Length of the sting + 13
Splitting the String bby", "5
trebe
Hello
World |Java Programming (2343203)
VSS. Perment.
voClass...Child...ectends... Parent...
£ =
Vaid....dis played C)
voasyskem .cuk,.Painkla@ this S.the..Cbile
Sle.
alee
sph
| =
vo PUDN Cn CMASS. shin.
Public....Skadic Void... din string l...xgsd.
= Chik...chisddlyj..+... Wewd.....chind. C3.
Chitdabj.display.paxent
ChildOgj.n.shisphrye iid dsJava Programming (4343203)
K. Input-Output:
this (s the Pavent cluss,
This ‘s the child chiss
78 |Java Programming (4343203)
H. pesources/equipment Required
a
Instrument/Equipment
/Components/Trainer kit
Hardware: Computer System
Computer (i3-i5_ preferable), RAM
mm mum 2 GB and onwards
Software: Operating System
Windows/ Linux
Software
Jdk 1.8.0 or above, Notepad++ or other
text editor
1. Safety and necessary Precautions follow:
ed.
‘© Shutdown computer system properly once the Lab hours are finished
J. Procedure to be followed/Source code:
“Aclass... AninoelJava Programming (4343203)
Class... labrador... extends... 093.
4
Noid... ColanC)
fe
t System..autt. Printlan.C. Lerlreidor...js...1ahuck.
In. Cobar
aay
ffubhne. class. Mana
— faite static. Void...2main GstriegLl...cimgs.2.
Ler bret dons..e61t.025,
leaker... barris)s
cleibmeiden..latvader. = new. Lebeadaxts
Leabrscider...Co.lox625,
80Java Programming (4343203)
K. Input-Output:
Eating...
Barking...
Lalsrudoy is bluck in color
Cpaogam Fimishedy
L. Practical related Quiz,
1. Whatis the purpose of inheritance in Java?
2. What are the advantages of using inheritance in Java?
3. Cana subclass have multiple superclasses in Java? If not, why?
M. References / Suggestions
« https://www.w3schools.com/java/default.as
= https://www iavatpoint.com/iava-tutorial
ail
COLIC C CCT ILIV Irae ra eee aJava Programming (4343203)
Resources/Equipment Required
S| Instrument /éguipment | aan
No.
| Jcomponents/Trainerkit |
1 | Wardware: Computer System | Computer” (G15 preferable) RAM
| mmimum 2 GB and onwards
| |
| 2 | Software: Operating System | Windows/ Linux
L — |
3 | Software [Jak 1.8.0 or above, Notepad+ or other
text editor
1. Safety and necessary Precautions followed.
. ‘Shutdown computer system properly once the Lab hours are finished.
1. Procedure to be followed/Source code:
Class......Animeal.
Ic Z :
Lo Vaid. ecuk.C)
cn
| Quantit |
y
| Asper
batch
| size
Syskem.out. Printing Amimal.is.ecrting25
|___f
i
Iclass....Da5....extends. Animal...
bait hac
co Bidiem ut Benin Bog ban
F ad _ 7
Iclass....CAb... exkemds...Amimaal.,
Ts
ie nen 6)
84]
ng.25,_—
ng (888209)
saa rons
poo Sustem...ouk. Patntla.C.Celt...JS...dm@ouhing.’)5
Class....Msiin
Mals...cnin. Cstring.l1..u7g.s)
MNEW...D95.035..
a [Lorn
dg.» breaks},
So DPW. EALG5.
Cot....meow.d)5,Jave Programming
sing.35
x
x.
L
M.
861
(4343203)
Input-Output:
Ammal t's eating
Dog
is barking
Animal fs eating
cat is bowing
Practical related Quiz.
1
2
3.
How is method oveiriding related to inheritance in Java?
What is the access modifier for a subclass method that overrides a superclass
method?
Can a subclass access private members ofits superclass in Java?
References / Suggestions
+ https://www.w3schools.com/iava/default.asp
hnttos://www.javatpoint.com/iava-tutorial
NeJava Programming (4343203)
which prints "Meow’. Finally, we create an object of Cat and assign it to a variable of type
Animal. When we call makeSound() on this variable, it still calls the makeSound() method of
Cat and prints "Meow", even though the variable is of type Animal. This is because the
makeSound() method is dynamically bound at runtime based on the type of the actual abject
being referred to.
H. Resources/Equipment Required
Se] strument/eauiprent Specification Quantit
‘| /components/Trainer kit y
[1 [Rardware: Computer System | Computer (3:15 preferable} RAM | Asper
mmimum 2 GB and onwards batch
anaes size
2 | Software: Operating System | Windows/ Linux
3 | Software - Idk 1.8.0 or above, Notepad++ or other
text editor
1. Safety and necessary Precautions followed.
'* Shutdown computer system properly once the Lab hours are finished,
J. Procedure to be followed/Source code:
[ASs......Amiomal...
mndkeSau.ns..C).,
‘System..oud.Peiatlo.c.seme..Saund')5
Od ven 88. .
ee amaiceSound. C2.
80 |Java Programming (4343203)
stlcereecereeerrcceett
Input-Output:
Woof
[Pre geJava Programming (4343203)
H,
A
Resources/Equipment Required
Safety and necessary Precautions followed,
Procedure to be followed/Source code:
Instrument/Equipment
‘/Components/Trainer kit
ae
al
batch
=
Hardware: Computer System | Computer
(i
mmimum 268
"35 preferabley Rang
and onwards
Software: Operating System Windows/ Linux
Software
text editor
Shutdown computer system Properly once the Lab hours are finished,
“Pivate. tnt Seed. 5
Rute... askaing...nsime;,
~~ fublic.. Coax C Stating snane sink. £ops peed)
this.name... a ancaney
this..topspeed.s toesesed;
Public Stming..be staingC)
rea :
t
elvan coxtt name =." numer
Sedan topSpeed +
ohJava Programming (4343203)
fui Class....AMein
[ ubiic Slehic. Uoid..-roesin Cs tatng(] cong)
Cer. COND, 2. MAUD. CHC Te YOd ..Curory””,120)5
COAX. CEFF LEW AKG LOM Au CAVN ey dA
CoAM..Car3..2.. NEW... Cor C: Lord.. MUSING NKQD;
Coa CRM. MCW. .GIIC TRS bod. M ORL So 20025
CK. BAG Fo DR. CAIC BMW... ABO.
System..Out... Paintha.C.coat.
System .out.PeintlnCcwr2.25.
Systemn..Gut,.PrinthaC.cur3.25,
System. Out..PadntlnC.ca7.4..2.5.
System, cut..Ptnth Cours...
98 |Java Programming (4343203)
K, Input-Output:
Cariname =* Toyota Cammy’, t0P speed = (204
Curd name = ‘Honda Civic”, top ayeed. 5 yet
Curt mame =* ford Mustang’ stop speed = Go}
Cas( mame = Tesla Medel S', top speed = 200)
Cos name => Bmw m3‘, top speed = \go}
pppoe rrr ere PTT IIIIISSIS I FI.|
ava Programming (4383203)
Jd.
ava Progrorming (4343203)
“fines Face. Tn den. face.
pare Void method 1.035.
Na
inlexface..miertuce2...
< :
aia Mois...methactt,.
Class....Myclass......Lmpiements.
Inter fence. 21
patenraced.
IISSSISIIIIS
les bite Naid.methadt.).
ee ‘Systern..cut.. Pinta Methad 1. implemen
dakion’2
{
eae
fe Move... naethod 2.0.
on SY SHEN... EERE Method. 2. Lmelemen-
EARS. :
aay
[ben
Publis. chuss.. Main. K Input-outpue
i. met
: : |
fublic.. Static. Uoidanain Gating llargsd mel
t
MyClass... Obj... new...My.classQ5.
| by... Method b.5,
103}
1041va Programming 1343203)
Ohi..metnod 1.025
Obj. method. 2.33
feuce. Ly
‘imeiemen-
2.imnpiemen-
1 get onpe eee
ethed =f implementutio!
re epee
104109
2203)
a rom
ct necessary rections followed
1 Safety and neces
rpm camer sate one once he ab hows arid
procedure tobe fllowed/Source code
s ‘absinedk... Class. shupe,
Tet ate
= —nloskresc...Aeuble..cinenO;
_¥
Class" Trismgleextenas.shuse
Private. “dew ble
use.
Priucate double,
heights.
Taiungle Cdauble base. deuble hight.
4:
ed NS DOSE 2 RSLS.
Ais. base. hasights.. height,
ob
@ovenide.
douale...anea. CD,
3shen..9,5.* buse* heights
J.
x
Clus...ftecrgle...extends... huge
Private. clouble"Venstns, A
Reiusite. “chouble. aye ths
|
a
nN
nN
=
a
~
~
an
=~
~
=
”
~
~
~
~
| Beshangle.
ien
{ 4.
@oveanid
deubie
sek
Wy.
\class.-Cincle.
Ke
Private
Cade
£
hi
4.
Gow
douk
&
Public,
Pasot.
FIIIISID
Java Programming (4343203)
110]
Ly.
|eluss....Ciacle.... .2Xben.cs.
KC.
ly
Rectangle.cdenrble. lenghh.-y--isa Ble. aid thd,
t
Thigwiengih lengths
this widths ..buidth >
al
@aveariae.
double...aren ©.
2
selua in. Lengtin *..idtla. 5.
shan Pe.
Btvcrbe...dorible.... etdlss
Ciacle Com ble..rerdsu.s.
a
FS. cle TUL. Soe,
J.
Oorenice.
double...caxed.0).
i.
"eltym...Mnedhn. OL. NU S.A IMA 5
PUBN 6. IAS Sof DAL,
BURCH” Void” main Cstoing LY G3 G5)Java Programming (4343203)
NN. Assessment-Rubrics
“Performance Indicators Weightage™
Process related iS Marks) ———~—~YSCSCSOH
[i [logic formation | 30%]
| a} Debugeing ability — “30%
| 3. Follow ethical practices 0% |
. Product related (10 Marks) 30%
“a [Expected output | 10%
eas |e
6. | Answer to sample questions
Total (25 Marks) 100%
{ ¢
| shape Giagle = new puingle C5,1095
| shape rectangle = new Rechingle Cu , 65
| Shape citcle = new Crecte C05
system.cut.tiniin cares of bedangie 2+ tangle
en \ tunge 2" tungle
| System. ov t Paintinc’ Area a& Fectunge ."t vectunsle,
area cd) 5 : cee
: ciecle 2+ cizcle
| system cut. Pini lnc Areu of Cr
laxreac);
1 3
Sign with Date
112 |Java Programming (4343203)
kK.
Input-Output:
Avea of tatmngle > 25.0
Reed of vectungle :2u.0
Area of Cixcle : 2g. 24 4333 FS 1ZO6I3
CRegzam Finished]
Practical related Qui2/Question.
1. What is an abstract class in object-oriented programming?
2. How is an abstract class different from a concrete class?
3. Can an object of an abstract class be created in Java?
M. References / Suggestions
https://www jevatpoint,com/abstract-class-in-iava
\www.w3schools.com/java/iava_abstract.ast
/www.geeksforgecks org/abstract-classes-in-iava,
https:
© httos:
1
PETINIIIINITIIIIIIIISIS
HETHEtT
uyJava Programming (4343203)
4
115]
Procedure to be followed/Source code:
rnp AMAL CLS bli) C18 Sn
kc
“Prinhbe...Skaing..messge. 5
ofa fidbli...6\neiiCluse. Csiiing...messciye)..
tints. messcige..> messege 5
Public..Vordk..d upluymessarg.e C)
4.
System. Sut. Paintin C mesge. a4 messaged;
. ec Clos... Onin.
onli. sStabic..aid....mition, Gseadingll. 08gs)
ih
oki) ls... Et
CNA ehle, Cine! Clas.”
Loby..t..708W....Conele ass
25
Finulobj. display. message;,
_
=
~
_-
bar)
~
~
~
~
~
~
~
~
Ons
ens
~
ene
ene
ene
OneJava Programming (4343203)
kK
117)
Input-Output:
Message 2 Hello , Final class!
Cropem — Frnishedy
Practical related Quiz/Question.
1. When used with a method, the final keyword prevents the method from being
overridden by any subclass
When used with a variable, the final keyword indicates that the variable’s value cannot
be changed after it has been initialized.
3. What isa final class in Java, and how does it differ from a regular class?
How do you declare a class as final in Java, and what are some examples of situations
where you might want to use a final class?
5. Cana final class be subclassed in Java? If not, why not?
6. Whatiis the purpose of declaring a method as final in Java, and how does it differ from
declaring a class as final?
7. Cana
| method be overridden in Java? if not, what happens when you try to override
it ina subclass?
References / Suggestions
© httos://www.tutorialspoint.com/What-are-final-classes-in-Java
© httos://www javatpoint.com/final-keyword
preererr trl IIIIIIISSISISIIIISSISXJava Programming (4343203)
1H. Resources/Equipment Required
Sr. | Instrument/Equipment Specification
/Components/Trainer kit
1 | Hardware: Comput
‘System | Computer (i315 preferable), RAM
mmimum 2 GB and onwards
| Software: Operating System — | Windows/ Linux
~~} dk 1.8.0 oF above, Notepade+ or other
text editor
1. Safety and necessary Precautions followed.
* Shutdown computer system properly once the Lab hours are finished
J. Procedure to be followed/Source code:
121
avant |
y
Asper
batch
size
|
|
ULL ILIIVIIIJIIJIIJIIIJJIJ IIIJava Programming (4343203;
Vetlo world... hells new
hello.greeb Qs
122 |Java Programming (4343203)
K Input-Output:
Hella World )
(Progaum Finished
BELLE III III IISISIIIIISIA——
4. Resources/Eauipmen Required
“Sr. | Instrumen/Equipment
* Seecifeation Quantit
Jo.
[Componerts/Trainer teh
1 Safety end necessary Precautions followed.
2 oh
own COMPLET Sem praperty once the Lab hours are finished.
1 Procedure to be followed /Source code:
Clos... Ditudefyerobs ception. earkends... x ception
© Divide Byrerc ExcePbion. Cstut-ng. Myessuye ?
Sper Cmessuged;.
Public. Sass Men,
4
Public Statice dowbie. divide Cont.ominas
Yank..d ene)... hhaows....Dimite By 2620E4.c8.AbION,
4
IF Cdeno 2392
Ill TIIIIIJIJII JI IJIN
(haow.new
Diwed By e209 C
~
Input-Output: +
”
~
“
~
~
~
~
~-
~
o~
~
ow
ow
en
oo
«
~
e
«
e
e———
Java Programming (4343203)
"4
Java
i. Resources/Equipment Required
nt specification | auansit |
¥ |
Computer (IE preerabe) aM asper |
mmimum 2.GB and onwards batch |
Sr. | Instrument/Equipy
No. | jcomponents/Trainer kit
7 | Hardware: Computer System
7 | Software: Operating System | Windows/ Linux
3 _| Software
=e
rp
|. Safety and necessary Precautions followed.
© Shutdown computer system properly once the Lab hours are finished.
1. Procedure to be followed/Source code:
SM8S....Jaa.sy ficient und &x¢e PHAN... .Lxends.
Exception. . sn
vague Pb ViE...ESMEFICLENs CuMAS Ox.cePbIONC.
Sexing., message). ae
APSR. Cmesseag 0.2.4.
&s
4
Class... GamnieAccount
L
Peivate....double.....psllunce.°
oe Public. BamicAccount.Cdeuble...cnitial.Galane)
Bene
IRUUAALE,, Fo DAH SALIBA. 3.
fublic void depasit Cdenuble....curmounts.
Lhaows... 2A SMPEI 61.8 ME EMMESEXEPAL EN,
<
wa}
ELIETIELITIIIIIIIIIIISIIIIIIISSQvantit
xtensds
valaane)
nt.
nes
(mow. new. Ensue ci
Exception C™nok... sufficient fur
yo
Public double. ger aotancedd
«
Fehwan balunces
J.
Public... clas Banning APeLicolian.
«
PAbL GE uSKONLE..VordrMe NCSLaINGO. G
ri 9
BumisAscount...account..., Mew. GamnAccount
Cr3008)}
fay,
ok
A.ccount..Withd xc Cocae,
acemn tL AGW.CMOOA,
account... hgaaW.C2e0e.,
Feat
L
Chas ME bislent@unasevceatione.)
Syslem. oul Mi ntlmce. gekmessageO)iJava Programming (4343203)
‘Srastem.onab..Paint lnc canarent...achicmces
{
fas ka bd F SDAIDE cn JRE BMWS.
3 .
|
IS
4
|
K. Input-Output:
Withdewn > RS» 20000
: Withdrawn 7 RS. 400°
Mot sufficient Fund
Curvent Bdlante , RS. 1000.6
1351
SCCLICLELEIIIIIIIIIIIISII SIIJava Programming (8343203)
y
| Specification Quantit
4
Hardware: Computer System | Computer (i318 preferable) RAN | Asper |
mm imum 2 GB and onwards batch
fee | eee | i
[2] Sofware: Operating System | Windows/ Linux
| |
3 | Satware 7a 180 orabve, Notepad or ates
text editor |
|. Safety and necessary Precautions followed.
‘* Shutdown computer system properly once the Lab hours are finished.
1. Procedure to be followed/Source code:
cBUHINC. Claas hain.
4
~fullic... Static. vad main Gskxing U1. conga.
©. :
Thread... theead |
thread... dread...
new... Thredd £0
Qian
Class... Theesds. extends. Thmesa
Goverrige
fablic Mei... MANO.
i white Cine).
L
threat. sleep cioead,.,
139]
FEELIOLILIIILISISIIIIIISIIINIIIIAILJ9va Programming (4343203)
CareW..CInterueked Gxcepbign..e2.
¢
©. PAANE SACS. L2eANE.C2},
4,
J 4
¥
Sass. shaead..extends...thaeste.
&
@.Override.
Sublic..vaid...2un.C.
£
Wwhile.ctaue2.
& c
oe SYREN CUE. PAHO CLAD LALLA.
ey
L
srt DHEA GLEE I.CLEADDS
J
Cotch..Chrtexam. eked exception. ©).
e
> Ou AMES HACK TRL TXE C5Java Programming (4343203)
K. Input-Output:
Theeud |
Theead |
Thread 2
Thread |
Thread |
thread 2
three |
1a]
LIEPPTIPPPPPKCPCP ISTP PVIIPP PPP Pee eee wweJava Programming (4343203)
Inport... thae eding.
oo REANGEG.
AUEMSS...Thvead....
LD REAL 5 sn
OAs. Lh Read.
Ode Tha eead.C2TOC III III IIIT.
Java Programming (4343203)
146 |
Input-Output:
Wen +2
odd
@dch-3
of
Odd: Lt
Even. 2
Odd 12
even:
odd 1194
even 19S
add 3193
ever . 200
Cerogram Finished]Java Programming (4343203)
4. Procedure to be followed/Source code:
; ed Reader.
Bubheaed writers
Pile Reader.
hent.:. deed faambile. CEule.eeth) 5
iln.C Content recd..Pxo™
= :
Pubhic...ctrinng..WOtd...luritelaFrle. CStatng..
Pafh.... Sfaningg....Gvna.teaatd,
vo AY. CBM Phe eduunctter... Wel t27.5 NEW.
IBM Remedi bea. Cre l.n Geum’ be: CEte.Ra.hh.22)
~
~
om
~
Writer. Uribe Contenta,. Pi
wt. “
OAK CLOCK LEREON..G.D. as eng
-eme
ome
ro
on
ss
~~
~~
ono
~~
oo
en Pein k6acatie Tame. (2.
Public. Steuben ne seettfaameile.Coiting
~Eileauth,>
‘Sting. Bmildber...62
Sheng awit 02.5...
kryciuesered Redd ex. eck &,
new... BMFFLEEA.AS. Adex. Cnew..$le read. Chil Ie RAL
asi]
152kK.
152 |
Java Programming (4343203)
i.
SRA NJ.Ai MES
MANE. COMME. Fa meENET. metd.Line.09.)
Ema la,
£.
Comlent..cppend Chine2..c.pmend cn." 5
:
y
Cateb..Ce0€xception...€.2.
at.
2,.PRAMESHACIS. TICE,
ee
RAHMAN... COMESNE:. HOS HAIG,
Input-Output:
Content ved From Fie : Hello , World |4
A
3571
Java Programming (4343203)
Resources/Equipment Required
Sr. Instrument/Equipment are aii are
No. canes ‘Specification Quantit
/Components/Trainer kit y
1 Rarer Computer Sytem Computer (3 preabolaaNy | Rp
crim 268 and onwards bath
| Senor Operating Stem | Windows Unaw
3 | Software dk 1.8.0 or above, Notepad++ or other |
tener |
Safety and necessary Precautions followed.
‘© Shutdown computer system properly once the Lab hours are finished.
Procedure to be followed/Source code:
JLimport...have..cts!
Aroay. Lists
limmporet...Jave Ubi. Limsed List,
lpaperk....JeAMe: MEL labsStb.5.
Pubic... Class... LstREma
A.
ees
PAIL... .SkRhIC Void... aS tring]...
vpn l SE, SEUNG 2. AIREY, ©. I0€.W..ABELY LMI}
Aweekdr ys, cred C* noradery "25,
Weekdoys..add.C' Tuesday.
Mleebaays...cidd..CWedmedayr3.
Weelstys...odé..CCouasd hyd
Weelsslsils.,.cldd.Co. PRA SAYERS),
Weekduys..dad.COSotuadyy.ds
Weelsdeil)..cidd. CS Sundery.’a5,
USEX Staring, .2memkng.s.new.Linked bab...
“I
SECCIELIEIILLIIIIIIIIISS SSI IIIISS.
Java Pr
158 |
|CTT ETadddDS Sd
Java Programming (4343203)
MonthS,.cldd.C’ Jam ucry.. Is
momtlss.tidd.C!' Febauary..95
mmamnths..odd.C". Mend,
months asd. Arai) Ja
mmonths,.ddd CY MY. I.
mmamths. ad Jame, 95
tombs. add Cl duly.” J
months..adl.Ch Axgust’d3
mnenthJadd Co Sepher bead
_Anonths,. iG 6 NOG €%."9 3.
overnber Ii
months, Suk December.” i
em. ak. Palin in OC" Wee leeelys. inns.
VSPLAY LSE. Cups leet iii 2 -
2.6 CiSmmnenths3).
ISplaylist. CLigtasizing >
fx Csstxingg...:tem... slvst3
~Sysem_h Grint. in Siheim
158 |Java Programming (4343203)
K
Input-Output:
Weekderys j
Monday
Tuesday
Wedmestuy
Thursday
Priduy
Saturday
Sunday
Months =
January
february
murch
pai!
muy
June
July
August
Se pteynber
October
Neve mbe™
Deceyn ber
SUCRE EEE LLIIIIIIIIISISIIIIISS,
|———— SS
ava Programming (43432
4.
Resol
03)
wurces/Equipment Required
instrument/Equipment
/components/Trainer kit
Hardware: Computer System
Specification Quantit
r) §
Computer —_(i3-i5_preferable),RAM | Asper
mmimum 2 GB and onwards batch "
size
|
Windows/ Linux
‘Software: Operating System
Jdk 1.8.0 or above, Notepad++ or other
1
Software
text editor
Safety and necessary Precautions followed.
‘Shutdown computer system properly once the Lab hours are finished.
Procedure to be followed/Source code:
Public....Class,
vay
erg héek.x7.05
163
(MPO... AMA SAKE
oeolersset add Cned
mG OLORESeb a Sds.C. Blue.
CohoAS SEE. ld 2.6" GREE wn
Calorsset..add.cl yew. 5.
MMA,
SekX Sta ng. Claas Sets
3.
1641Java Programming (4343203)
K. Input-Output:
Golors im the Hashset
Red
Ghue
Yellow
Green
(pogrom Frnished)
168 |
a mm ree eet TnJements of the HashMap after clearing it
splay the
IL Display re een HashMap after clearing it!" + map)s
System.out.print
)
resources/Equipment Required
Sere ine oe
‘Sr. Instrument/Equipment Specification am
No. | ;components/Trainer kit
7 | Hardware: Computer System | Computer (i3-i5 _preferable),RAM
mmimum 2 GB and onwards
= site
2 ‘Software: Operating System Windows/ Linux |
3 | Software Jdk 1.8.0 or above, Notepad++ or other
text editor
L. Safety and necessary Precautions followed.
«Shutdown computer system properly once the Lab hours are finished,
J. Procedure to be followed/Source code:
. {import JAMEL UL. HASSAN 2
Public ClAS5....ANEiN...
Pubic. Stuhic. Meid...rmain.Cstring..O. xrgs...
EshMar.2 (nteger stning.. Srasentie?
DMs P.62.053.
“stucent Mar. PAECSL Jugal”
student Mara Put Cél..
StudentmMab.. CUeCes on
169 |
we wtaee Et TELIITTIIIISSISS IS IIIS SSSA!VATU dd ddd ddd,
oe
Java Programming (4343203)
LEC Siudent MalP..Containsiseyy Cemelymentsy
i
SYANG... SLACENLNAIMNL...5..SEUAEME HIP.
gekCenzal mented.
Syston. GUt..P2A7 bla. S. ue em. 2M:
With..emarol.men.t...mo..b.e.mreLimenk. Net:
Sten buameds.
else...
x -
one SHEN. TAs Prim dle Cunre, Skea erat
Cound... with... enaoline nl... LNAOLIMEMEMOD 5
—
J.
¥.
1701_ .}©64
gramming (4343203)
oS,
Java Pro
IIISSS,
k. Input-Output:
Student name wih ensolment no ut + khush
Crrogaur Finished J
m1}
BLECICE EEL EL IIIIIIIIIIIIISS