This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
1. The class TestClass cannot be declared abstract 2. The variable j cannot be declared transient 3. The variable k cannot be declared synchronized 4. The constructor TestClass( ) cannot be declared final 5. The method f( ) cannot be declared static
Answer given as 3 and 5, 3 is ok but how come 5??
SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
The below link has given differences between constructors and methods which says methods cant have same name as class.
Actuallly the article doesn't say that at all.
Constructors have the same name as their class; by convention, methods use names other than the class name.
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Joined: Dec 05, 2006
I executed the code successfully.As per my understanding by java convention it is not advisable to use classname as method name but it wont throw errors if we use it. [ December 19, 2006: Message edited by: nike sama ]