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

Test

Sin título

Jamie M 50 preguntas

Hacer el test

Preguntas del test (50)

  1. 1By default, a reference variable that is an instance field is initialized to the value
    1. Anull
    2. B0
    3. Cvoid
    4. Dstatic
  2. 2If you write a toString method for a class, Java will automatically call the method any time you concatenate an object of the class with a string.
    1. AVerdadero
    2. BFalso
  3. 3Of the following, which would be considered the no-arg constructor for the Rectangle class?
    1. Apublic Rectangle (int len, int width)
    2. Bpublic Rectangle (double len, double width
    3. Cpublic Rectangle()
    4. DAll of these
  4. 4The key word "this" is the name of a reference variable that an object can use to refer to itself.
    1. AVerdadero
    2. BFalso
  5. 5What will be returned from the method, if the following is the method header?

    public Rectangle getRectangle()
    1. Athe address of an object of the Rectangle class
    2. Bthe values stored in the data members of the Rectangle object
    3. Ca null value
    4. Dan object that is contained in the class Rectangle
  6. 6When a method's return type is an object, what is actually returned to the calling program?
    1. Aa reference to an object of that class
    2. Bonly the values in the object that the method accessed
    3. Can object of that class
    4. Da null reference
  7. 7When an object is passed as an argument, it is actually a reference to the object that is passed.
    1. AVerdadero
    2. BFalso
  8. 8Assume that inputFile references a Scanner object that was used to open a file. Which of the following while loops shows the correct way to read data from the file until the end of the file is reached?
    1. Awhile (inputFile.nextLine == " ")
    2. Bwhile (inputFile != null)
    3. Cwhile (! inputFile.EOF)
    4. Dwhile (inputFile.hasNext())
  9. 9Before entering a loop to compute a running total, the program should first
    1. Aset the accumulator variable to an initial value, usually zero
    2. Bset all variables to zero
    3. Cread all the values into main memory
    4. Dknow exactly how many values there are in total
  10. 10How many times will the following for loop be executed?

    for(int count = 10; count <= 21; count++)
    System.out.println("Java is great!");
    1. A0
    2. B12
    3. C10
    4. D11

Información

Descripción
Test sobre Sin título, creado por Jamie M el 24/07/2018.
Autor
Jamie M
Idioma
English
Visitas
1
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?