多选题 Given:
2. class Super {
3. static String os = "";
4. void doStuff() {os += "super ";}
5. }
6. public class PolyTest extends Super {
7. public static void main(String[] args) {new PolyTest().go(); }
8. void go() {
9. Super s = new PolyTest();
10. PolyTest p = (PolyTest)s;
11. p.doStuff();
12. s.doStuff();
13. p.doPoly();
14. s.doPoly();
15. System.out.println(os);
16. }
17. void doStuff() {os += "over "; }
18. void doPoly() {os += "poly "; }
19. }
What is the result?
【正确答案】 A
【答案解析】