This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Runnable Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Runnable Interface" Watch "Runnable Interface" New topic
Author

Runnable Interface

Amardeep Salkar
Ranch Hand

Joined: May 22, 2008
Posts: 46
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
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
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?


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Runnable Interface
 
Similar Threads
why doesnt this get compiled?
Runnable confusion
how to instantiate anonymous inner class?
regarding threads
How setDaemon works