class A
{public int getNumber(int a){return a+1;}}
class B extends A
{public int getNumber(int a, char c){return a+2;}public static void main(String[] args){B b=new B();System.out.println(b.getNumber(0));}}
what is the result?()
A.compilation succeeds and 1 is printed
B.compilation succeeds and 2 is printed
C.compilation succeeds and 3 is printed
D.An error at this program cause compilation to fail
第1题:
第2题:
以下标识符哪些是合法的?哪些是Java的关键字? miles, Test, a++, --a, 4#R, $4, #44, apps,class, public, int, x, y, min value, 成绩, radius,最大值max。
第3题:
下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)
A.<class 'int'> <class 'float'> <class 'str'>
B.<class 'float'> <class 'int'> <class 'str'>
C.<class 'str'> <class 'float'> <class 'int'>
D.<class 'str'> <class 'int'> <class 'float'>
第4题:
第5题:
00330038003000301585067361821下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)
A.<class 'int'> <class 'float'> <class 'str'>
B.<class 'float'> <class 'int'> <class 'str'>
C.<class 'str'> <class 'float'> <class 'int'>
D.<class 'str'> <class 'int'> <class 'float'>
第6题:
用于定义类成员的访问控制权的一组关键字是()
A.class, float, double, public
B.float, boolean, int, long
C.char, extends, float, double
D.public, private, protected