gosrai

Greenhorn
+ Follow
since Feb 02, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by gosrai

Hi friends
Just three weeks of java-ranching got me an SCJP on my resume.
I wanted to thank all of you guys for maintaining such an educating and helping site. Well If I have studied more I could have scored good percentage also.
But I will reveal my passing percentage which is exactly 61%.
I have been a silent learner from the site and has not been participating enough but I promise now onwards I will also try helping others as all of you had helped me through this site.

Thanks a Lot
Ranjeeta
23 years ago
Hi Lokesh
thanks a lot for your explanation.
I understand it now, that caught exceptions would not terminate the program but uncaught would.
I think overdoing creates more confusion.. I am realising this, day by day getting more
Ranjeeta
23 years ago
Hi folks
31. Consider the code below:
void myMethod()
{ try
{
fragile();
}
catch( NullPointerException npex )
{
System.out.println( "NullPointerException thrown " );
}
catch( Exception ex )
{
System.out.println( "Exception thrown " );
}
finally
{
System.out.println( "Done with exceptions " );
}
System.out.println( "myMethod is done" );
}
What is printed to standard output if fragile() throws an IllegalArgumentException?
a) "NullPointerException thrown"
b) "Exception thrown"
c) "Done with exceptions"
d) "myMethod is done"
e) Nothing is printed
According to me the answer should be.. b,c.
But the answers in MindQ site are b,c,d.
I am bit confused here. Please help
Ranjeeta
23 years ago