www.webdeveloper.com
Results 1 to 5 of 5

Thread: Anonymous Java classes

  1. #1
    Join Date
    Apr 2004
    Posts
    13

    Anonymous Java classes

    This is not really a JavaScript question, but more of a Java question.

    I want to know if it is possible to have an anonymous Java class extend something.

    For example
    addWindowListener(new WindowDestroyer() extends WindowAdapter {
    public void windowClosing(WindowEvent e)
    {
    System.exit(0);
    }
    });
    http://www.ivanpapusha.com

  2. #2
    Join Date
    Jul 2004
    Location
    London
    Posts
    284
    This is not really a JavaScript question, but more of a Java question
    If you are aware that the question you are asking does not belong here then why ask it at all?

    Dan

  3. #3
    Join Date
    Apr 2004
    Posts
    13
    Because Java is similar to JavaScript at least in some sense and there are no forums here that are specifically to non-web programming languages.

    I just figured that since there are so many sharp guys here, they would know Java and would be able to help me.

    In addition, I didn't want to sign up for another forum just to post one topic.
    http://www.ivanpapusha.com

  4. #4
    Join Date
    Dec 2003
    Location
    A series of tubes known as the "internets"
    Posts
    2,166
    Originally posted by zprog
    In addition, I didn't want to sign up for another forum just to post one topic.
    it could be worth it, as you might have another problem in the future.

    try these:
    http://javabotique.com/
    http://javaboutique.internet.com/
    http://www.devx.com/Java/
    "Outside of a dog, a book is a man's best friend. Inside a dog, it is too dark to read." - Mark Twain

  5. #5
    Join Date
    May 2004
    Location
    Manhattan NY
    Posts
    6,028
    You still have to create and define the class in a class file somewhere. You'll get undefined errors otherwise.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles