Click to See Complete Forum and Search --> : Anonymous Java classes
zprog
08-26-2004, 10:09 AM
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);
}
});
BillyRay
08-26-2004, 10:18 AM
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
zprog
08-26-2004, 11:10 AM
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.
rhsunderground
08-26-2004, 12:53 PM
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/
JPnyc
08-26-2004, 01:03 PM
You still have to create and define the class in a class file somewhere. You'll get undefined errors otherwise.