下面选项中有关类常量的定义正确的是()
A: public final float PI=3.14;
B: int i=5; public static final int NUM=i+1;
C: public static final boolean T=”true”;
D: public final int TWO=’B’
A: public final float PI=3.14;
B: int i=5; public static final int NUM=i+1;
C: public static final boolean T=”true”;
D: public final int TWO=’B’
举一反三
- 下面选项中有关类常量的定义正确的是哪一项? A: public final float PI=3.14; B: int i=5; public static final int NUM=i+1; C: public static final boolean T=”true”; D: public final int TWO=’B’
- 定义一个公有double型常量PI,哪一条语句最好?( ) A: public final double PI; B: public final static double PI=3.14; C: public final static double PI; D: public static double PI=3.14;
- 以下声明常量不正确的是( ) A: final int PI=3; B: final PI=3; C: static final int PI=3; D: public static final int PI=3;
- 以下声明常量不正确的是( ) A: final int PI=3; B: final PI=3; C: static final int PI=3; D: public static final int PI=3;
- 以下声明常量不正确的是( ) A: final int PI=3; B: final PI=3; C: static final int PI=3; D: public static final int PI=3;