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

Test

Sin título

Athena Kozak 10 preguntas

Hacer el test

Preguntas del test (10)

  1. 1Which one is not correct?
    1. AString shoes[] = new String[];
    2. Bint [] digits = new int[5];
    3. CPlant plantSpecies[] = new Plant[22];
    4. Ddouble weightClass[] = new double[2];
  2. 2You can remove 'memory slots' from an array if they are no longer needed.
    1. AVerdadero
    2. BFalso
  3. 3What will be the print out?

    char alphabet[] = new char[26];

    alphabet[0] = 'A';
    alphabet[1]= 'B';
    alphabet[2] = 'C';

    System.out.println(alphabet[1]);
    1. AA
    2. BB
    3. CC
    4. DNone of the above, it will print memory address
  4. 4When you create an Array, all elements inside must be the same data type.
    1. AVerdadero
    2. BFalso
  5. 5Choose the correct 'formula' for creating an array:
    1. Adata type + variable[] = new variable[n];
    2. Bdata type + [] + variable = new data type[n];
    3. Cvariable + data type[] = new data type[n]l
    4. Dvariable + [] + data type = new variable[n]
  6. 6This code will run:

    String names[] = new String[4];
    String[0] = "4";
    1. ATrue
    2. BFalse
  7. 7Loops are controlled by boolean statements.
    1. AVerdadero
    2. BFalso
  8. 8What is the correct way to calculate the length of the following array?

    String names[] = new String[5];
    1. Aint n = names.length();
    2. Bint n = getLengthOfNames[];
    3. Cint n = names.length
    4. Dint n = names.trim().length()
  9. 9What is the flaw in this line of code?

    int index= 0;
    while( index < words.length )
    {
    System.out.println(words[index]);
    }
    1. AThis is not the correct format to write a while loop
    2. BIndex is not incrementing so the loop is flawed
    3. CCondition is never true so it can not evaluate
    4. DThere is a synatx error
  10. 10What will print out?

    Movie movieTitle[] = new Movie[5];

    movieTitle[0] = "Nacho Libre";
    movieTitle[2] = "John Wick";
    movieTitle[3]= "Serenity';

    System.out.println(movieTitle[2]);
    1. Anull
    2. B"John Wick"
    3. CThe memory address for "John Wick"
    4. DSyntax Error

Información

Descripción
Test sobre Sin título, creado por Athena Kozak el 15/03/2019.
Idioma
English
Visitas
2
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?