摘要:
// 1.必须要有接口方法 public interface TargetClass { void sayHello(); int add(int a, int b); } // 2.目标对象实现了接口方法 public class TargetClassImpl implements Target 阅读全文
摘要:
def eat(name): print("{}该吃饭了".format(name)) lst = [] for i in range(1, 10000): x = yield lst lst.append(x) g = eat('张三') # 只是生成对象,不执行函数里面的代码 # print(g 阅读全文