Results 1 to 4 of 4
  1. #1
    exltus is offline Member
    Join Date
    Dec 2011
    Posts
    7
    Rep Power
    0

    Default problem with void

    Hi,
    iam trying to make void, that will start next 1 void (no mether why i need this...i know that is stupid)
    public void xxxxx(Void y)
    {
    y; //i need to put some y void here...how can i do this?
    }

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default Re: problem with void

    Whatever this Void class is you can get at the variables and methods that it has (so long as they are accessible) and that's it.

    Of course Void may be like the Runnable interface, or may even implement Runnable. In that case the xxxxx() method can say

    Java Code:
    y.run();

  3. #3
    exltus is offline Member
    Join Date
    Dec 2011
    Posts
    7
    Rep Power
    0

    Default Re: problem with void

    Java Code:
    public void xxxxx(Void y)
    {
    y.run();
    }
    deos not work in netbeans:(

  4. #4
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,004
    Blog Entries
    7
    Rep Power
    20

    Default Re: problem with void

    I didn't know a Void object had a run() method?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Replies: 1
    Last Post: 12-04-2010, 05:41 PM
  2. Int equals void
    By Insomniac Riot in forum New To Java
    Replies: 14
    Last Post: 05-06-2010, 03:44 PM
  3. Replies: 5
    Last Post: 01-24-2008, 11:53 PM
  4. is void a type?
    By mary in forum New To Java
    Replies: 3
    Last Post: 08-01-2007, 08:12 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
  •