¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

chapters 9 and 10 pt 1

Joe Delisle 71 preguntas

Hacer el test

Preguntas del test (71)

  1. 1 What is the output of the following code?
    String s = "University";
    s.replace("i", "ABC");
    System.out.println(s);
    1. AUnABCversity
    2. BUnABCversABCty
    3. CUniversABCty
    4. DUniversity
  2. 2Which of the following is the correct statement to return a string from an array a of characters?
    1. AString.toString(a)
    2. BconvertToString(a)
    3. Cnew String(a)
    4. DtoString(a)
  3. 3Every instance data field f in the class can be referenced using this.f in a static method the same class.
    1. AVerdadero
    2. BFalso
  4. 4Analyze the following code.Imagen de la pregunta 4
    1. AThe program has compile errors because the variable radius is not initialized.
    2. BThe program has a compile error because a constant PI is defined inside a method.
    3. CThe program has no compile errors but will get a runtime error because radius is not initialized.
    4. DThe program compiles and runs fine.
  5. 5The following program displays ________.Imagen de la pregunta 5
    1. AJava
    2. BJava and HTML
    3. Cand HTML
    4. Dnothing is displayed
  6. 6Which of the following are properties of a constructor?
    1. AA constructor must have the same name as the class.
    2. BA constructor is called using the new operator.
    3. CConstructors may be overloaded.
  7. 7Which of the following statements are true?
    1. AA default constructor is provided automatically if no constructors are explicitly declared in the class.
    2. BAt least one constructor must always be defined explicitly.
    3. CEvery class has a default constructor.
    4. DThe default constructor is a no-arg constructor.
  8. 8What is the output of the following program?Imagen de la pregunta 8
    1. A1234567 1234567
    2. B1234567 7654321
    3. C7654321 1234567
    4. D7654321 7654321
  9. 9Which of the following statements is correct?
    1. AInteger.parseInt("12", 2);
    2. BInteger.parseInt(100);
    3. CInteger.parseInt("100");
    4. DInteger.parseInt(100, 16);
    5. EInteger.parseInt("345", 8);
  10. 10BigInteger and BigDecimal are immutable
    1. AVerdadero
    2. BFalso

Información

Descripción
chapters 9 and 10
Idioma
English
Visitas
238
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?