C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Very Simple Exception Handle Program in Java
WhatsApp
Alagunila Meganathan
Aug 10
2016
919
0
0
exceptionHandle.rar
import
java.io.*;
public
class
exceptionHandle{
public
static
void
main(String[] args)
throws
Exception{
try
{
int
a,b;
BufferedReader in =
new
BufferedReader(
new
InputStreamReader(System.in));
a = Integer.parseInt(in.readLine());
b = Integer.parseInt(in.readLine());
}
catch
(NumberFormatException ex){
System.out.println(ex.getMessage() +
" is not a numeric value."
);
System.exit(
0
);
}
}
}
java
Exception Handle
Up Next
Very Simple Exception Handle Program in Java