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

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

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

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:
    594
    Jeff Carver
    Aug 25, 2004
  2. d wood
    Replies:
    1
    Views:
    636
    Christophe Vanfleteren
    Apr 15, 2004
  3. E11
    Replies:
    1
    Views:
    5,667
    Thomas Weidenfeller
    Oct 12, 2005
  4. christopher diggins
    Replies:
    16
    Views:
    1,021
    Pete Becker
    May 4, 2005
  5. Todd Johnson

    Class instantiation question

    Todd Johnson, Oct 7, 2003, in forum: Python
    Replies:
    5
    Views:
    506
    Alex Martelli
    Oct 8, 2003
  6. Ognen Duzlevski

    dynamic class instantiation

    Ognen Duzlevski, Jan 30, 2006, in forum: Python
    Replies:
    10
    Views:
    781
    Volker Grabsch
    Feb 4, 2006
  7. Joseph Turian
    Replies:
    5
    Views:
    843
  8. Replies:
    1
    Views:
    797
    Salt_Peter
    Dec 25, 2006
Loading...