Class Instantiation

Discussion in 'Java' started by sara, Sep 15, 2006.

  1. sara

    sara Guest

    Hi All,

    I have a program with a main class which wants to instantiate multiple
    classes inside itself but it wants to instantiate each of them with
    different
    frequnecies, e.g. instantiate class1 every two hours and class 2 every
    three hours.

    Is there any way I can do it?

    Thanks,
    Sara
    sara, Sep 15, 2006
    #1
    1. Advertising

  2. sara

    Hal Vaughan Guest

    sara wrote:

    > Hi All,
    >
    > I have a program with a main class which wants to instantiate multiple
    > classes inside itself but it wants to instantiate each of them with
    > different
    > frequnecies, e.g. instantiate class1 every two hours and class 2 every
    > three hours.
    >
    > Is there any way I can do it?


    Yes.

    This sounds a lot like a homework assignment, so I won't say much, but I'd
    track when tables are created and sleep until needed.

    Hal
    Hal Vaughan, Sep 15, 2006
    #2
    1. Advertising

  3. sara wrote:
    > Hi All,
    >
    > I have a program with a main class which wants to instantiate multiple
    > classes inside itself but it wants to instantiate each of them with
    > different
    > frequnecies, e.g. instantiate class1 every two hours and class 2 every
    > three hours.
    >
    > Is there any way I can do it?



    No. This is one of the few complete holes in Java. I think Sun is planning
    to fix it in version 1.7.

    Now do your own homework.
    Mike Schilling, Sep 16, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Carver
    Replies:
    3
    Views:
    416
    Jeff Carver
    Aug 25, 2004
  2. Ike
    Replies:
    0
    Views:
    1,316
  3. d wood
    Replies:
    1
    Views:
    543
    Christophe Vanfleteren
    Apr 15, 2004
  4. E11
    Replies:
    1
    Views:
    4,698
    Thomas Weidenfeller
    Oct 12, 2005
  5. Replies:
    1
    Views:
    558
    Salt_Peter
    Dec 25, 2006
Loading...

Share This Page