单项选择题

下列代码的执行结果是( )。  public class Test 2{  public static void main (String arg[]){  System.out.println(100%3);  System.out.println(100%3.0);  }  }

A.1和1
B.1和1.0
C.1.0和1
D.1.0和1.0
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序的输出结果是( )。 public class fff{ void printValue (int m) { do{System.out.println( The value is”+m): } while (--m>10) } public static void main(String arg []){ int i=10; Test t=new Test(); t.printValue(i); } }
A.8
B.9
C.10
D.11
单项选择题
自动类型转换是按优先关系从低级数据转换成高级数据,规定的优先次序是( )。
A.byte,short,char→int→long→float→double
B.float→int→long→byte,short,char→double
C.int→long→float→double←byte,short,char
D.double→int→folat→long→byte,short,char
相关试题
  • Java Application源程序文件的扩展名为(...
  • 根据程序的构成和运行环境的不同,Java源程...
  • 在Java源文件中( )类最多只能有一个,其...
  • 转义字符以________开头。
  • 下面( )是main()函数的合法参数。