[单选题]

阅读下面程序: public class OperatorsAndExpressions { void residual { int i=100,j=30; float m=563.5f,n=4.0f; System.out.println(i%j); System.out.println(m%n): } public static void main(String args[]) { OperatorsAndExpressions perAndExp=new OperatorsAndExpressions(); //取模运算符在整数和浮点数中的应用 OperAndExp.residual(); } } 程序运行的结果是

A.10 3.5

B.20 2.5

C.10 4.5

D.20 3.5

参考答案与解析:

相关试题

阅读下面程序 public class OperatorsAndExpressi

[单选题]阅读下面程序 public class OperatorsAndExpressions { void equalsMethodl(){ String s1=new String("how are you"); String s2=new String("how are you"); System.out.println(s1==s2); } public static void main(String args[]){ OperatorsAndExpressions perAndExp=

  • 查看答案
  • 请阅读下面程序public class OperatorsAndExpressi

    [单选题]请阅读下面程序 public class OperatorsAndExpressions { void residual() { int i=100, j=30; float m=563.5f, n=4.0f; System.out.println(i%j); System.out.println(m%n); } public static void main(String args[]) { OperatorsAndExpressions perAndExp=new OperatorsAndE

  • 查看答案
  • 阅读下列程序段public class OperatorsAndExpressi

    [试题]阅读下列程序段public class OperatorsAndExpressions {String conditionalExpression(int score) {String result;//如果score超过60分, 则结果是passed, 否则是doesn't passresult=-(score>=60)?"passed":"doesn't pass";System.out.println(result);retum result;}public static voi

  • 查看答案
  • 阅读下面程序public class VariableUse { public

    [单选题]阅读下面程序 public class VariableUse { public static void main(String[] arqs) { int a; if(a==8) { int b=9; System.out.println("a="+a); System.out.println("b="+b); } System.out.println("a="+a); System.out.println("b="+b): } } 该程序在编译时的结果是A.变量a未赋值B.第

  • 查看答案
  • 阅读下面程序:public class ThreadTest { public

    [单选题]阅读下面程序: public class ThreadTest { public static void main(String args[]) throws Exception { int i=0; Hello t=new Hello(); ______; While(true) } System.out.println("Good Morning"+i++); if(i==2&&t.isAlive()) { System.out.println("Main waitin

  • 查看答案
  • 阅读下面程序public class Increment { public st

    [单选题]阅读下面程序 public class Increment { public static void main( String args[] ){ int c; c=5; System.out.println(C) ; System.out.println(c++); System.out.println(C) ; } }A.5 6 6B.5 5 6C.6 7 7D.6 6 6

  • 查看答案
  • 阅读下面程序public class Increment {public sta

    [单选题]阅读下面程序 public class Increment { public static void main( String args[] ){ int c; c=5; System.out.println( c ); System.out.println( c++ ); System.out.println( c ); } )程序运行结果是( )。A.5 6 6B.5 5 6C.6 7 7D.6 6 6

  • 查看答案
  • 阅读下面程序 public class ConcatTest{public st

    [单选题]阅读下面程序 public class ConcatTest{ public static void main(String[] args) { String strl = "abc"; String str2 = "ABC"; String str3 = str1.concat(str2); System.out.println(str3); } } 程序的运行结果是:A.abeB.ABCC.abcABCD.ABCabc

  • 查看答案
  • 阅读下面程序public class Increment { public st

    [单选题]阅读下面程序 public class Increment { public static void main( String args[] ){ int c; c=5; System.out.println(C) ; System.out.println(c++); System.out.println(C) ; } }A.5 6 6B.5 5 6C.6 7 7D.6 6 6

  • 查看答案
  • 请阅读下面程序 public class ThreadTest {public

    [单选题]请阅读下面程序 public class ThreadTest { public static void main(String args[]) throws Exception{ int i=0; Hello t=new Hello(); while(true) { System.out.println("Good Moming"+i++); if (i==2 && t.isAlive()) { System. out.println("Main waiting for

  • 查看答案
  • 阅读下面程序:public class OperatorsAndExpressi