第一题: Car is a vehicle and car is a collectable : class A implement B,C{}Car has a SteeringWheel : class A { B b;}Car has Wheels : class A {List<B> b;}Mini is a Car :calss A extends B{}Car is a Object:class A{}
第二题已经解决了 现在 还剩下第一题 个人比较倾向于 这个答案 第一题: Car is a vehicle and car is a collectable : class A implement B,C{} Car has a SteeringWheel : class A { B b;} Car has Wheels : class A {List <B> b;} Mini is a Car :calss A extends B{} Car is a Object:class A{} 还有没有其他的答案啊 谢谢!
private static Single create()
这样就可以了
第四题: Reader reader = new BufferedReader(new FileReader("in"));
Writer writer = new PrintWriter(new BufferedWriter(new FileWriter("out")));
第五题: 顺序下来是 hasNext ,hasNextBoolean, nextBoolean, next多看看API 文档啊,都很简单的
第四题: Reader reader = new BufferedReader(new FileReader("in"));
Writer writer = new PrintWriter(new BufferedWriter(new FileWriter("out")));
第五题: 顺序下来是 hasNext ,hasNextBoolean, nextBoolean, next多看看API 文档啊,都很简单的
Relations:A,B,C,D,E
1->A
3->E
6->B
6->C
5->D
你的答案不对!
应该这样:
abstract static Single instance;
protected Single(){}
Car is a vehicle and car is a collectable : class A implement B,C{}Car has a SteeringWheel : class A { B b;}Car has Wheels : class A {List<B> b;}Mini is a Car :calss A extends B{}Car is a Object:class A{}
先不说 abstract static Single instance; 这句的莫名其妙,
就说 protected Single(){} , 把构造方法都公布出去了,还怎么单例 ?
Car is a vehicle and car is a collectable : class A implement B,C{} Car has a SteeringWheel : class A { B b;} Car has Wheels : class A {List <B> b;} Mini is a Car :calss A extends B{} Car is a Object:class A{} 还有没有其他的答案啊 谢谢!