Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile 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
Pie
Posts: 42967
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