Unit 2 End Term Java
Unit 2 End Term Java
Uuit-2 Date
Class Hellowonld
pulolic stahe void maiu Sting aagsl
System out priutlal"HQloolay
save s Hellowol.jav
Ci1) javac Hellouuotd. avg
Ci)lass -Reseuve uordg
-Decl as0s that ue class uiU bedeliu
BuffeEeodta,
duteg i= iutege.valueof
ntege ab i
Page No.
Date
class Eauplo
u pub.lie
Tutegon az'we Tutegcoaltl;
S.o.pa)L
lass wrapp1
iutegeai= uew Dutegle(1o);
u'abì iut vaiel);
eatu JCoutay
oaappee, class ru feildhe
bDota
P'uge No.
Dute:
TutenfasLS
Abstract Clas.
LaniyO
tam eontencl
Cau eontedanly
lutoface
lutenfaca
class
i) Cay have bot To) Have ouy abatora
ahorac conelte metuod.
Sytam
Hollouod tudiom
ucian Grreetiug
Sring nQuMee NamastelA
Hollouogld
publie oid qacetsuecue Stiug So
Vame8OueOne
SoPMaMaste) +naue;
Paz: No.
Dats
() NOstod lasCan dipue a clas wiHaln
class
lass Outesrclas
ass estod l o
class CPu
doubu peio
doubleeres
Striug mOuufactusUHi
doublegetehce
doube getllocksperd
Pege No.
Date :
pockage pok
public olass A
pmteced void masg)90p ("Hello');
package wypock
nport pack
las Bea nteds A
Bohi neB/)
uwt eHaod
( ) Stop Aukowmakical colld oheu theuee
reak
-cau break oas triug nto ohene
have t
faciit to die?
auoted strings idoueifte ale. bwwewlos
ho be
to toheingd
coustuet a stag
sperfed tou toheniner Hue for
ConstrueBos
Speei al i hrpe of wetiod thot ued to
iuitaline He dota olej
-Couetrueor Oe w t bcae a itscla
bt
ane ame eloy haue
Les sowe asquweut
atonsaticolle paus t u
will
asguweuts to-au&truta.
Emcsphioual HamdlMg
()eheehedem ephoM
The cneupton be proueted b Hue
(ti)uueueehad enepiou
ptoy
Hue
e.qi- Argay ndom out of ouud
Page No.
Date:
iut ailo
lb=10,
Kuute golyuopwsw
A1Bo h o n as Dunaie uetuod dñepato
Refescne Claje c of
Clild
Paeut clas
los B enteuds A?
Uass eihe
voiöl ouu1 SoP(uuniug?)
closs spuudor eonleude Bike
Afey
safe utty
6o kuw'
b.uul) epleudol),
Page No.
Date
|Caw ue initialine
initialie a final solic Qsualote
Maidea couetoueto.
publicAOA
las A
Statie
Page No.
Date :
Mod Oveold
:elp to tmeeene
t e reod ality mpleentatou
atotmettte
Tweteuce
ettre
ututoue
Poor peutorwanee
Merod oueloaa
alic iut add Cmta,tutbN
,retuatt)
State i t add (nta; ut b, }ute
Yosnlaote;
Pags a
CouleHow ealleeoyg
tuteface Utyelass
utiitcttiod
of iudiuidual
opeete oú colleton
wuit
asdi.add (geeke);
Oesi. add (rg ce ke");
So.P(eeeute of aytie oefoe
9-0.P (asoist)
toeetiaus, ad a Au(asunst, web,e stb
Coltou Sot(aserb)
B.op(oslist);
Dt
Page H
Puslhe Pop
import java.util
pualic class Stack PusluPopEmamlet
Stoclk Kiuteqen)'etK=uws4ack )0;
SoprSt ak:'+ s4h);
pusholut (Stkyo);
13);
,845:
90);
4s);
218)4
pepclmuts*)
pepeluutlsAK);
popelyut (stu)i
{ Catou Ewpky StackEmeeptou e
S0p(eupty ctack));
So.eStack. "ts*);