Actress actoress=new Actress();
actoress.setName("xxx");
actoress.start();
大佬们
为啥这样写报错呢 ?
The method setName(String) is undefined for the type Actress
Actress继承自Runnable接口,接口没有任何的实现代码。而Actress类本身也没有setName方法,因此JVM找不到setName方法会报错