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                      
tip   To Refer this Site to Your Friends   Click 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
What is the need of "creating and throwing an
UserdefinedException" when the "Exception" class is already
available?
 Question Submitted By :: Shiva034
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the need of "creating and throwing an UserdefinedException" when the "Exception" class is already available?
Answer
# 1
There are some exceptions that are not defined by java api
ex- invalid age exception ,invalid number exception etc.

in user defined exceptions are raised by programmer,
thrown by programmer ,handled by programmer

while predefined exceptions are raised by system,
thrown by system
handled by programmer
 
Is This Answer Correct ?    0 Yes 0 No
Vinayakkatkar
 
  Re: What is the need of "creating and throwing an UserdefinedException" when the "Exception" class is already available?
Answer
# 2
user defined exception is used throwing out(user) own
exception..
 
Is This Answer Correct ?    0 Yes 0 No
Guru
 
 
 
  Re: What is the need of "creating and throwing an UserdefinedException" when the "Exception" class is already available?
Answer
# 3
if you want you could specify your own exception that you
know is gonna happen otherwise it is recommended to handle
the exception through exception class in catch block.
 
Is This Answer Correct ?    0 Yes 0 No
Sri
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
whays is mean by inner class? HCL2
class{ ... ... interface myinterface{ ... ... } abstract class{ .. .. } ... .. .. } is this possible to write "Interface and/ or Abstract class inside a class ? if possible whcich one is possible is only interface? is only abstract? Logica-CMG2
What will happens if you opened Internet Explorer 4 times?  2
What is unicode?  2
What is method Overriding in the perspective of OOPS?  1
if i have one string class then how can you achive this class functionality of this class? Fidelity3
How will you create the class for the following scenario? Employees under one employee? Bally-Technologies2
What is difference between hash mapping and hash table? NDS3
When does the compiler supply a default constructor for a class? TCS7
Name the types of 'priority'?  2
Functionality of JVM?  3
what is the form of storage space in java?  4
What is the purpose of the File class?  2
what is a static block?  3
how to call One constructor from another; Innodata-Isogen4
Why can't we make jsp as a controller and action servlet in struts?  3
why java not supproting multiple inheritance?  3
what is the use/perpose of having a method antive?  2
what is meta-Inf? Polaris1
what is the difference between Java Command Line and C command Line?  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