Hi. This is code explaining exception in initializers. Can some one explain the comments code whihc says "cannot understand" or give me link where i can understand the cncepts better. It's simple but i still cant get it Thnks.
The future belongs to those who believe in the beauty of their dreams.Dream BIG!
Not sure what you are asking for... most of stuff that you marked are self explanatory... but okay...
Declare a private static method, name createHotelPool, that returns an array of Hotel instances.
Create an array of Hotel, with noOfHotels elements, and return it from the method.
Create a new Hotel object, and do nothing with it. If the creation of the object generates a RoomOccupancyTooHighException, then print out the stack trace.