package com.t;
import java.util.concurrent.Callable;
public class T{
public static void main(String[] args) {
Test test = new Test();
test.run();
Test1 test1 = new Test1();
test1.run();
Test2 test2 = new Test2();
try {
String call = test2.call();
System.out.println(call);
} catch (Exception e) {
e.printStackTrace();
}
}
}
class Test extends Thread{
@Override
public void run() {
System.out.println("---------Thread-------");
}
}
class Test1 implements Runnable{
public void run() {
System.out.println("---------Runnable-------");
}
}
class Test2 implements Callable<String>{
public String call() throws Exception {
return "Callable";
}
}