JAVA PROGRAMMING
(DCO-515)
Program 5: Write a program in java for Exception Handling.
Submitted by:
UMAIR RIAZ
Roll. No. 16-DCS-067
Diploma in Computer Engineering- V Semester
Computer Engineering Section
University Polytechnic, Faculty of Engineering and Technology
Jamia Millia Islamia (A Central University)
New Delhi-110025
Session 2018-2019
Exception Handling
#Source Code
class Test
{
void doMoreStuff()
{
[Link]("Do more Stuff-1");
[Link](10%0);
[Link]("Do more Stuff-2");
}
void doStuff()
{
[Link]("Do more-1");
doMoreStuff();
[Link]("Do more -2");
}
public static void main(String [] args)
{
Test t=new Test();
try
{
[Link]();
}
catch (Exception e)
{
[Link]("Exception handled in main method");
}
}
}
//Output