问题描述:
[单项选择题] 下列程序的执行的结果是______。 public class ex8 { public static void main(String[] args) { double d=0; int a=3; while (a>0) { d=d+l. of/a; if (d<=2)continue; a--; } System.out.println (d); } }
A.4.2
B.3.5
C.2.8
D.无限循环
在一个类的内部嵌套定义的类称为 【7】 。
类变量的作用域是_________。
在Java语言中,所有的变量、常量、_________和_________都是用标识符命名的。
下列程序的输出结果是( )。 class Father{ int m.n; Father(int a,int B) { m=a; n=b } void show ( ){ System.out.println("m and n:"+m+" "+n); } } class Son extends Father{ int p; Son (int a,int b,int C) { super(a,B) ; p=c; } void show(){supur.show( ); System.out.println("p:"+p); } } class Test { public static void main (String args[ ]) { Son s:new Son(6,7,8); s.show( ); } }
Java语言的异常处理机制中______语句或______语句可省略,但二者不能同时省略。
点评难度:
参考答案:
试题分享: