标签:message port scanner new public ann ext .sh ring
import java.util.Scanner;
interface ShowMessage{
void showTradeMark();
}
class TV implements ShowMessage{
String a;
TV(String a)
{
this.a=a;
}
public void showTradeMark()
{
System.out.println("I am TV "+a);
}
}
public class Main{
public static void main(String[] args){
ShowMessage sm;
Scanner sca = new Scanner(System.in);
sm = new TV(sca.next());
sm.showTradeMark();
}
}
标签:message port scanner new public ann ext .sh ring
原文地址:http://www.cnblogs.com/lijunzone/p/6682975.html