Java的变量名定义中,以下选项中全部为合法变量名的选项包括(
)。
A: Age2、2Age、AGE
B: _Class、xJava、my_name
C: xxxx、class、qjk
D: my_class、my_age、my_boss
)。
A: Age2、2Age、AGE
B: _Class、xJava、my_name
C: xxxx、class、qjk
D: my_class、my_age、my_boss
举一反三
- 若是存在变量$ag=25,下而哪项中的代码不能输出"My age is 25"?( ) A: echo "My age is".Sage B: echo "My age is $age" C: echo 'My age is $age'; D: echo "My age is "."$age";
- My grandpa died _________. A: at the age of my 2 B: for 2 years C: when I was 2. D: my age was 6.
- My grandpa died ______ . A: A . at the age of 2 B: B . for 2 years C: C . when I was 2 D: D . my age was 6
- My grandpa died(). A: A.at the age of my 2 B: B.for 2 years C: C.when I was 2 D: D.my age was 6
- 下面哪个程序变量age的定义是正确的() A: public class Employee{ public void show(){ System.out.println(age); } public int age; } B: public class Employee{ public void show(){ System.out.println(age); int age = 20; } } C: public class Employee{ public void show(){ System.out.println(age); } }