Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pls Explain few lines of the code.

 
Nabila Mohammad
Ranch Hand
Posts: 664
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Henry Wong
author
Marshal
Pie
Posts: 21003
77
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Henry
 
Nabila Mohammad
Ranch Hand
Posts: 664
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Henry that helped Big time!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic