Results 1 to 2 of 2
  1. #1
    onegcr is offline Member
    Join Date
    Aug 2007
    Location
    Hyderabad
    Posts
    1
    Rep Power
    0

    Default 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..

  2. #2
    lockmac is offline Member
    Join Date
    Aug 2007
    Posts
    8
    Rep Power
    0

    Default

    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..

Similar Threads

  1. Initialization and re-assignment of arrays
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-14-2008, 08:38 PM
  2. initialization value problem
    By ravian in forum New To Java
    Replies: 2
    Last Post: 01-28-2008, 10:54 AM
  3. Icon initialization problem
    By saz25 in forum AWT / Swing
    Replies: 1
    Last Post: 12-24-2007, 10:37 PM
  4. log4j initialization
    By arfatkhan in forum Web Frameworks
    Replies: 3
    Last Post: 08-10-2007, 07:42 PM
  5. hibernate lazy=False
    By Ed in forum JDBC
    Replies: 2
    Last Post: 07-02-2007, 07:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •