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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
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
When try and catch block is used ?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: When try and catch block is used ?
Answer
# 1
When chance of exception and not to terminate the 
application
 
Is This Answer Correct ?    1 Yes 0 No
Raghuveer
 
  Re: When try and catch block is used ?
Answer
# 2
To detect the error.
 
Is This Answer Correct ?    0 Yes 1 No
Saroj
 
 
 
  Re: When try and catch block is used ?
Answer
# 3
we are useing the try/catch for handling the 
exceptions ,and then we can able to read and understand  
the exception easily.
 
Is This Answer Correct ?    0 Yes 0 No
Sujanya
 
  Re: When try and catch block is used ?
Answer
# 4
try is used to enclose the code which is supposed to throw 
an exception
catch is used to catch the exception which is raised with 
in the try block
 
Is This Answer Correct ?    1 Yes 0 No
Ravikiran
 
  Re: When try and catch block is used ?
Answer
# 5
in order to over come an abnormal condition try and catch 
block is used
 
Is This Answer Correct ?    0 Yes 0 No
Vivek
 
  Re: When try and catch block is used ?
Answer
# 6
Try and Catch block is used for Exception handling..
Try block is used for monitor the errors  and using catch
block we can shows to users what type of Exception occurred
in our program ...see the following Example code it can be
useful..        


class ExceptionExample
{
	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.");// Here shows
Exception to user
		}
		
	}
}
 
Is This Answer Correct ?    0 Yes 0 No
Anandh
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is garbage collection in Java, and how can it be used ? Wipro10
What is protected and friendly?  1
How many objects are created for a singleton class Ness-Technologies4
How can you eliminate duplicates?  1
what is Hashmap & Hashtable wirh example? Saksoft4
what models are available for event handling?  1
how can i connect to database in a applet ?  1
what is polymorphism?  2
Is it possible to write static method in abstract class? justyfy your answer? Hexaware3
How to create two different thread class inside a main function?  1
How GUI component handle its own events?  1
Why const and goto are reserved keyword in java?  1
How to deprecate a method? Show it with proper example. Plz give the answer of this.Thanx in advance. mail me: tanzeem.akhtar@gmail.com  1
what is mutability?which one is mutable String or StringBuffer?and why?give examples of each which shows the mutability of each String or StringBuffer  2
what is the difference between Java Command Line and C command Line?  1
how to transactions(Bank transactions) in business process in ejb? Photon1
Hi, well i am unable to understand that why it is mandatory to have same hashcode, if two objects are same? Thanks in advance.  5
What is an enumeration class?  2
String is a immutable objects . it means that string does not change........... But it will be chang......... { String s="kapil"; String s1="raj"; String s=s1; then print(.......) The String has been changed .. how it is possible and why its called immutable objects  3
What is "finally" keyword?  3
 
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