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.
why the above code gives compile error???
can anyone explain please??
Joined: Sep 06, 2009
because at compile time the compiler knows only about the Hotel class.....compiler thinks you would call Hotel's method whch declares to throw a checked exception....which shoudl be caught....which isnt in your code....so bang ...compile error