Original Post
I do not use Java very much. For that reason the following snippet has me confused: Are we creating some kind of lambda function or something? Are we deriving from Runnable? How? This syntax has me confused :( Could someone break down what is happening part-by-part?
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Runnable doHelloWorld = new Runnable() {
public void run() {
System.out.println("Hello World on " + Thread.currentThread());
}
};
doHelloWorld.run();
}
}