Given:abstract class Bar { public int getNum() { return 38; }}public abstract class AbstractTest { public int getNum() { return 45; } public static void main(String[] args) { AbstractTest t = new AbstractTest() { public int getNum() { return 22; } }; Bar f = new Bar() { public int getNum() { return 57; } }; System.out.println(f.getNum() + " " + t.getNum()); } }What is the result?
选项:
A:57 22;
B:45 38;
C:45 57;
D:An exception occurs
发布时间:2024-04-03 13:44:28