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       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
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 difference between throw and throws?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between throw and throws?
Answer
# 1
The 'throw' statement initiates an exception to be thrown
where as the 'throws' clause declares that the method is
expected to throw 1 or more checked execptions.
 
Is This Answer Correct ?    29 Yes 5 No
Ranganathkini
 
  Re: What is the difference between throw and throws?
Answer
# 2
'throw' exception is thrown manually and 'throws' exception 
is thrown predefindly.
 
Is This Answer Correct ?    17 Yes 7 No
Sushma
 
 
 
  Re: What is the difference between throw and throws?
Answer
# 3
throw will declare an exception 
throws will throw the exception to the calling method
 
Is This Answer Correct ?    12 Yes 5 No
Ravikiran
 
  Re: What is the difference between throw and throws?
Answer
# 4
By Using throw , we can create our own exceptions or user 
defined exceptions and we can thorw , where as  throws 
defines the list of exceptions to be thown by the method.
 
Is This Answer Correct ?    5 Yes 2 No
Swapna Kumari Arava
 
  Re: What is the difference between throw and throws?
Answer
# 5
'throw' is declare the exception and throws is defined the 
exception
 
Is This Answer Correct ?    1 Yes 2 No
Rajanani
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is meant by throwing an Exception? Accenture4
we have two threads..both the threads are reading the data.. is there any need of synchronization there?...justify it? IBM4
what is webservices? CTS1
Explain method overloading and overriding?  6
can you program for reverse string? IBM5
Which characters are allowed to use as the second character of an identifier, and which characters are not allowed?  2
What class is used to implement a Throwable array?  3
Does a class inherit the constructor of its super class?if it does, how can you hide that constructor? if it doesnot how can you call it from the sub class?  1
when,where and how to use abstract class and interface  2
explain about jre and jvm  2
Can I create any Marker Interface? If yes then how can I use it???  1
AWT event listeners extends what interface?  1
What are order of precedence and associativity, and how are they used?  1
what's diff between struts 1.1 & 1.2 Wipro2
How to create two different thread class inside a main function?  1
What modifiers can be used with a local inner class?  2
What is non static block in java Ness-Technologies6
What is a serializable interface?  3
Is there any use of an abstract class which has no methods and no attributes? Wipro1
what is difference between method overloading & method overridding with example? IBM2
 
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