Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between throw and throws?

Answers were Sorted based on User's Feedback



What is the difference between throw and throws?..

Answer / ranganathkini

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 ?    43 Yes 5 No

What is the difference between throw and throws?..

Answer / sushma

'throw' exception is thrown manually and 'throws' exception
is thrown predefindly.

Is This Answer Correct ?    23 Yes 9 No

What is the difference between throw and throws?..

Answer / swapna kumari arava

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 ?    16 Yes 4 No

What is the difference between throw and throws?..

Answer / ravikiran

throw will declare an exception
throws will throw the exception to the calling method

Is This Answer Correct ?    16 Yes 8 No

What is the difference between throw and throws?..

Answer / neeraj kumar singh

When we wants to throw an exception explicitly in the program use the throw keyword.Whether a throws keyword is used when a system throws an exception itself.

Is This Answer Correct ?    5 Yes 0 No

What is the difference between throw and throws?..

Answer / kashi

thow is used to explicitly transfer the userdefined
exception class object from the function to the calling
place.
thows is used to mention or indicate to the compiler as
well as the enduser, that a particular function is proven
to generate exception class object and those objects are
not handled in the function itself.

Is This Answer Correct ?    3 Yes 0 No

What is the difference between throw and throws?..

Answer / senthil nathan

throws: If a method is not capable of handling the raised
exception and it wants the caller of the method to
handle the exception means then the method uses the
"throws" keyword... The exception raised here is
of System Exception not User Exception...


throw: If the method is capable of handling the exception
by using try&catch block then this method uses the
"throw" keyword.. It is also used to raise our own
exception.

Is This Answer Correct ?    2 Yes 0 No

What is the difference between throw and throws?..

Answer / kanhaiya sharma

throws :- throws clause is used when programmer does
not want to handle to the exception and throw it out of a
method.

throw :- throw clause is used when programmer wants to
throw an exception explicitely and wants to handle it using
catch block. hence throws and throw is contradictory.

Is This Answer Correct ?    3 Yes 1 No

What is the difference between throw and throws?..

Answer / nashiinformaticssolutions

C++ only has throw. throws is used in Java for declaring exceptions.

Is This Answer Correct ?    0 Yes 0 No

What is the difference between throw and throws?..

Answer / anjna garg

throw is always use in catch eeception and throws is not
use in catch exception

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More Core Java Interview Questions

What is a variable and constant?

0 Answers  


What are mutable classes?

0 Answers  


What is the full meaning of java?

0 Answers  


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

0 Answers  


explain Anonynous inner class?

6 Answers   TCS,


What are methods of a class?

0 Answers  


What is api data?

0 Answers  


Which variable is the independent variable?

0 Answers  


What are the differences between include directive and include action?

0 Answers  


In a container there are 5 components. I want to display the all the components names, how will you do that one?

0 Answers  


Can we create object of static class?

0 Answers  


What are the different types of java?

0 Answers  


Categories