Created
March 17, 2014 19:44
-
-
Save Falci/9606802 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package certificacao; | |
public abstract class ClassA { | |
public void run(){ | |
System.out.println("running..."); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package certificacao; | |
public class ClassB extends ClassA implements Runnable { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package certificacao; | |
public class Main { | |
public static void main(String[] args) { | |
Runnable classB = new ClassB(); | |
new Thread(classB).start(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment