单项选择题

Java语言中,下列标识符错误的是( )。

A.Name
B.question
C.$number
D._tree
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序段的输出结果是( )。 public class Test public static void main(String args[ ]) int x,y; x=(int)Math.sqrt(5) 2+(int)Math.random()*5 2; y=(int)Math.sqrt(3) 2+(int)Math.random()*3 2; if (x>y) System.out.println( x>y ); else if (x==y) System.out.println( x=y ); else System.out.println( x<y );
A.x>y
B.x=y
C.x<y
D.编译错误
填空题
以下程序计算1+1 3+1 5+…+1 (2N+1),直至1 (2N+1)小于0.00001,请在横线处将程序补充完整。 public class Sun public static void main(String args[]) int n=1; double term, sum=1.0; do n= 【12】 ; term=1.0 n; sum=sum+term; while(term>=0.00001); System.out.pfintln(n); System.out.println(sum);
相关试题
  • 当使用Thread t=new Thread(r)创建一...
  • Java编写好的程序首先由编译器转换为标准字...
  • 包含Swing构件的Applet(小应用程序)应该...
  • 以下程序计算1+1 3+1 5+…+1 ...
  • 压缩文件输入流类都是 【11】 的子类,...