Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
- public class DemoThread extends Thread{
- public void run(String msg){
- System.out.println("Thread Started: " + msg);
- }
- public static void main(String args[]){
- DemoThread thread = new DemoThread();
- thread.start();
- }
- }
b. Program will compile, but will not run.


