• 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

      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);

    • 3

      下列选项中,不能创建字典对象的语句是( )。 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)

    • 4

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