-
Lazy Initialization
Objects in java can be initialized whenever the application requires. Although they may be declared initially but can be used only at runtime if required. This concept is called Lazy initialization. Please let me know some practical cases if any of you have come across..
-
Wouldnt this be useful for creating objects "on the fly"? E.g. having a Customer class and creating a new Customer that gets put into a customerList[] array? You would then just create it like customerList[new Customer(name, address, phone)..i would of though this is a practical use.. unless i dont know of others and have completely mis-understood your statement..