Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Runnable Interface

 
Amardeep Salkar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public static void main(String str) {
System.out.println("String main()");
Runnable ren = new Runnable() {
public void run() {
System.out.println("Hello Amardeep");
}
};
}

How this program works....
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Offhand I'd say it doesn't do much (and probably not what its author intended).

What happens if you execute it? Was that what you expected? If not, what did you expect?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic