C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
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
889
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