Wednesday, December 31, 2008

New Java Interest

OK, call me a hypocrite or whatever you want...I'm starting to change my mind about the Java programming language. Recently I've made many comments to many people about the inefficiency and poor semantics of the Java programming language but I'm starting to retract those comments the more I learn about Java. I don't think I'm alone in being confused when I first saw code that looks like the following...

public static void main() {
EventQueue.invokeLater(new Runnable() {
void run() {
// Do some stuff here
}
});
}


Java's implementation of anonymous classes and inner-classes are pretty slick and they're starting to grow on me. I'm thinking that I'm going to make a few more basic posts when I run across some better examples. I've got a couple in mind...in particular using the ActionAdapter class when you would rather use an anonymous class for trapping events and you need more than one control to use the event handler (vs. using the Action interface directly which doesn't contain default implemetations of methods).

I'll post more later. I just wanted to get in a quicky before I forgot to post again.

Happy New Year All!

No comments: