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
You are on page 1/ 7
TASK BE 0 Wolo.
faite
ave
Dreefem thet ditplewys He pusta bey
of chasawters, line and wore th a tout fy,
ampewd jase
clase ask #6
$
x
pobli Slatic void mein (sraing ontgst Thou
I0Ee uceplion
i ' Fingal
Buttered Reader bos new Butlered Reader (newging :
StreamPeaden (Gysteme1)) 5 "
System-out-Printlo(*entes a file name)
Sting S= o> seadlineCy$
Sls, cheo, in=0, wd=03
FieTnpel giveam fto=new FileInpul$trecsnals)e
do
&
Sd= fin. geadCy ae
4(g4 1=-)
Cht+ ¢
78 (Cohares = =! Wl (chor) 64
wots
ia (chee) 4 ==")
lott,
3
WKle (84)Sy elem 0 aertin(t” :
ene xed println( The numben of chisaclers
‘by
Syetem outeprintlo(! tie Biddrie) of nds t's nl
ucte ‘ / ;
‘usten-oue printlo(" The number of hina Kos
\ 4 4n)s
$
Kod
Qutpae
Enter a file name
Palindwome class
chorachent
The number of choractes is BO
Tre number of words 78 30
The number of lines 4812
Enter a Fle name
oetchano ofnct
Chatactes'5iste a Jorn progeny Wat teads « ti
ile
and Aisdays the file 00 “the sexeen, with a
yne — pambet befowe each line
mpc at jovarionks
clase Task 58
2
public Stole yoid rnctin (¢4%ing args J) thors
To Reption
4
BufferedReader br= new Buttered Reades(neoinpd
Stream Redes psa id)" o
fe Oust + print (“Enter a file name”) s
‘ ‘ng $= by. teadfine 3
Wt 61, Fag
FileTn pudétream Fin =new FileInpelsyrean(s) 3
System. Out println(i+4) 5
do
£
$4. £inecrendey 5
VW(st=-1)
System. ouct -pttette (Cehooiss) 2
FHC Cchag) eb ==| 0)
% System-outt-Printlo (7 +5tle (¢4 t= D5
Line closecd$
}
4
oxstpat
oot
Enter a Ale name
archanatt
i
Fam
2 7
curchana &e“TASK CA
Witte a Java Progra dot handling Cheeked
Exceptions.
Gopord fava-io- Becttered Readers
—strmport java “to FtleReodes
mport favor jonTOF vee ption 3
puvlic Class Checked Exc eplion Euampe
: .
paivele — gtoctic Sting Filepath «et Jusees|uefoster] >
22 2H1AC6 DO|pfrente :
public gtarie void main(gring angst J)
plectferder bé=nulls
sing lines
{oy
: = new Butfened Reades (new File Readex(filepa))
vote (Chine POTOEuception wos coughs cx sesl HP | op
anny incedo) pyfhon tut (The System cannot
Hind the ile sfecitied)TASK GB
Uneher keel
Write @ Tava Program fev banelling
parceptions:
Close Tasker §
public Static void morrio (Sting ang
§
Ay
‘int oe Je fy, 2,8, 45 55
System -oul- printin (ena) :
a09)
% .
cacteh (sirovaspTnclexDut OF BoundsEweprtivn €)
&
system owl -printlo("
ey ;
3
¥
5
Quetpet
The specified sndiew doesnot euists.
Se
“The spenitied ander doesnot