• 2021-04-14
    下列语句片断中,four的值为()。 Int three=3; Char one=’1’ Char four=(char)(three+one);
  • 4

    内容

    • 0

      中国大学MOOC: 下列语句片段中,a3的值为( )。int a1 = 3;char a2 = 1; char a3 = (char)(a1 + a2);

    • 1

      下列语句能给数组赋值而不使用for循环的是 A: myArray{[1]="One";[2]="Two";[3]="Three";} B: String s[5]=new String[]{"Zero", "One", "Two", "There", "Four"}; C: String s[]=new String[]{"Zero", "One", "Two", "There", "Four"}; D: String s[]=new String[]=|"Zero", "One", "Two", "There", "Four"};

    • 2

      下列选项中,不能创建字典对象的语句是( )。 A: {'one':1, 'two':2, 'three':3} B: dict('one':1, 'two':2, 'three':3) C: {one=1, two=2, three=3} D: dict(one=1, two=2, three=3)

    • 3

      int one = 10 ; int two = 20 ; int three = 0 ; three=one+two; System.out.println("three = one + two ==> "+three); three+=one; System.out.println("three += one ==> "+three); three-=one; System.out.println("three -= one ==> "+three); three*=one; System.out.println("three *= one ==> "+three); three/=one; System.out.println("three /= one ==> "+three); three%=one; System.out.println("three %= one ==> "+three);

    • 4

      Alook-outatthebowsightsanobjectonyourportside.Howmanybellstrokesshouldhesound?() A: One B: Two C: Three D: Four