Recent Posts
- NCC Punjab LDC Results 2013 NCCPunjab.com Interview Selected Candidates List
- RGUHS PGSSET Super Speciality 2013 Exam www.logisys.net.in Online Application
- RKCL RS-CIT Results 2013 rkcl.in RSCIT Final Exam May Result 2013
- TNEB Electricity Bills Online Payment tnebnet.org/awp/login Tamilnadu EB Payment System
- Kerala LET 2013 Fee Structure for 2013-14 Engineering College Admission
Discussion Forum
Exception Handling in Java Example Program
You can find Exception Handling in Java Examples (Sample) Program) . In this page you can learn basic concept of Exception Handling Example Program.
You can find Exception Handling in Java Examples . In this page you can learn basic concept of Exception Handling Example Program.
class BasicException{
public static void main(String args[]){
int d,a;
try{
d=0;
a=42/d;
System.out.println(“This will not be printed.”);
}
catch(ArithmeticException e){
System.out.println(“Division by zero.”);
}
System.out.println(“After catch statement.”);
}
}
Result:
Division by zero.
After catch statement.

One comment
This Java Exception Handling example program is really simple and easy to understand. Can you also provide that how to handle exception handling in real time scenario. Also tell where to use throw and where should we need to use throws keyword in Java Exception Handing.