ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
What is Exception handling in Java
How do you handle run time errors please explain with an 
example
 Question Submitted By :: Nagireddy.siddaka
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is Exception handling in Java How do you handle run time errors please explain with an example
Answer
# 1
Exceptions are handled by using "try","catch" and "finally" 
block in the program.
The part of code which is suspected to give an exception is 
kept under try block.
The exception is then been caught by the "catch" block. In 
this way, we can avoid the abnormal termination of the 
program and can also display some user friendly messages 
which could guide them on how to refrain from exceptions.

finally block contains the code which is necessary to 
execute like closing of connections established with 
database while running the application.
finally block is always executed irrespective of the 
exception.
 
Is This Answer Correct ?    9 Yes 0 No
Uv
 
  Re: What is Exception handling in Java How do you handle run time errors please explain with an example
Answer
# 2
Exception handling is a mechanism to handle unexpected 
situations in java. This avoids the program to be 
terminated upnormaly.
 
Is This Answer Correct ?    2 Yes 0 No
Edward Sudhahar Chennai
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Can I create any Marker Interface? If yes then how can I use it???  1
what is the difference b/w PUT and POST method to send data to the server Mind-Tree2
What are null interfaces? Give some examples?  2
diff b/w sleep(1000) and wait(1000)? Huawei2
What are the ways of polymorphism other than Overridding & Overloading  1
Which all r Final classes in java except string?  3
I have one POJO class(Java bean class), it has two variables for that it has setters and getters. Now i have created two objects for that class and i have set the data for those variables through this two objects. Now question is i want check whether those two objects have same data or not, for this write a program? Thanks, Bose. Oracle2
How are this() and super() used with constructors?  4
Hi friends, i am new to java. can you explain how java is secured.  1
class A{ some variables; public void a()throws Excepion1,Exception2{....} } class B extends A{ variables... public void a()throws E2,E3{.....} } Qns: here override of methods occurs or not,ore else wil give any compilation error or run properly..plz tell me briefly whts happening with the above codes.... Quinnox3
How to create an instance of a class without using "new" operator? Plz help me out properly.Thank u. CSC8
what is Dictionary? and what purpose it is used for?  2
What is the smallest package in Java API?  4
int a=1; float b=1.0; System.out.println(a==b); Honeywell8
Who developed JScript language?  3
What are the names of interfaces that doesn't consists of method/s ?  3
1).what is the difference between below examples String s="vijay"; String s=new String("vijay"); TCS11
Name the methods that used to get and set the text label displayed by a Buttonobject?  1
Which Java operator is right associative?  1
What is an object?s lock? Give name of object?s that have locks?  1
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com