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 difference between throw and throws in exception?

Answer Posted / ritesh

Throw :- It is possible for your program to throw an
exception explicitly, using the throw statement.

Throws :- If a method is capable of causing an exception
that it does not handle, it must specify this behavior so
that callers of the method can guard themselves against that
exception.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

'A class is a template for an object' explain this statement.

1099


Can you access the private method from outside the class?

1019


What is the use of set in java?

1182


If a class is declared without any access modifiers, where may the class be accessed in java programming?

1293


describe synchronization in respect to multithreading? : Java thread

973


What are the library functions in java?

1096


Explain access modifiers in java.

1102


What is super?

1250


Why arraylist is not synchronized in java example?

1115


What is locale in java?

1058


How do you add an element to a set in java?

1079


What happens when a thread cannot acquire a lock on an object in java programming?

1071


Which methods cannot be overridden in java?

1048


What are measurable parameters?

1130


What are wrapped classes in java programming?

1101