下面选项中哪一行代码能正确赋值( ):
A: final int num1 = 10;
B: static int num2 = 20;
C: abstract int num3 = 30;
D: private int num4 = 40;
A: final int num1 = 10;
B: static int num2 = 20;
C: abstract int num3 = 30;
D: private int num4 = 40;
举一反三
- 下面选项中哪一行代码能正确赋值( ): A: final int num1 = 10; B: static int num2 = 20; C: abstract int num3 = 30; D: private int num4 = 40;
- 分析下面程序,哪一行代码能正确赋值() class Demo { public void method() { final int num1 = 10; static int num2 = 20; abstract int num3 = 30; private int num4 = 40; } }
- 下面选项中哪一行代码定义到方法体内能正确赋值() A: final int num1 = 10; B: static int num2 = 20; C: abstract int num3 = 30; D: private int num4 = 40;
- 分析下面程序,哪一行代码能正确赋值?()classDemo{publicvoidmethod(){finalintnum1=10;staticintnum2=20;privateintnum4=40;}} A: final int num1 = 10; B: static int num2 = 20; C: abstract int num3 = 30; D: private int num4 = 40;
- 分析下面程序,哪一行代码能正确赋值?() class Demo { public void method() { final int num1 = 10; static int num2 = 20; private int num4 = 40; } } A. B. C. D.