Bandlamudi Narasimha Rao

Greenhorn
+ Follow
since Nov 22, 2002
Merit badge: grant badges
For More
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 Bandlamudi Narasimha Rao

I had a basic doubts, tried a lot to clarify from books, but i am not satisfied with the explanation given in any of the book. Could any of you give clear explanation with the proper example, i will be glad to you.
My doubts are,
1) When using the super() or this() in the constructor, it should be first the statement in the constructor., otherwise when compiling error will be throw, so in a constructor both willn't used at a time. Yes it is fine. Will same thing found in all the Java books. My doubt is why the super() or this() call to be first one, why they designed Java like this. Will it be a serious drawback in Java if it would have not been implemented (i.e., super() or this() should be the first statement in the constructor). Is this implementation is a great useful, otherthan initializing the class variables or similar use.
2) When a method is overridden in the the sub class, the overriding method should throw only the exceptions thrown by the overridden method or some of the exceptions thrown by the overridden method or sub classes of the exceptions thrown by the overridden method. Why is this restriction? If this restriction is not present how will it matter?.
3) When a method is overridden in the the sub class, the overriding methods accessibility should not be more restrictive than overridden method.
21 years ago
Hi Mukherjee
Thanks for putting good question. I thought of posting same question, but after going thruogh urs i thought it is not necessary. Thank to all for ur valuable suggestions. If any of u thought to add more suggestions, kindly mail to me, most welcome and will be glad to u.
[ November 22, 2002: Message edited by: Bandlamudi Narasimha Rao ]