Abhishek Jadhav

Greenhorn
+ Follow
since Jun 24, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Abhishek Jadhav

Unchecked Exceptions are not necessary to handle or declare, but checked exception need to declare or handle.
While writing the API you don't need to bother about unchecked exceptions that means it doesn't make difference by throwing unchecked exception but if you want to make mandatory for calling function to handle or declare particular exception then you can throw checked exception.

-Abhishek
12 years ago
No this will not create two threads instead it will throw an exception.
But you can try this:


This wil create two different threads with the same target run method of MyThread object.

-Abhishek
Enums are mostly used in scenarios like If you want to restrict the user for selecting the values from other than the fixed set of values .

I think following example illustrates what i want to say:

Suppose there is requirement to restrict the user from selecting the values of coffee type other than HOT and COLD then you can create enum of CoffeeType with the values of HOT and COLD in this way user can't give any third value .

-Abhishek.
12 years ago