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

Test

Java MCQ

Bharathy Kgisl 2 preguntas

Hacer el test

Preguntas del test (2)

  1. 1Which of these cannot be declared static?
    1. Aclass
    2. Bobject
    3. Cvariable
    4. Dmethod
  2. 2class access{
    static int x;
    void increment(){
    x++;
    }
    }
    class static_use {
    public static void main(String args[])
    {
    access obj1 = new access();
    access obj2 = new access();
    obj1.x = 0;
    obj1.increment();
    obj2.increment();
    System.out.println(obj1.x + " " + obj2.x);
    }
    }
    1. A1 2
    2. B1 1
    3. C2 2
    4. Dcompilation Error

Información

Descripción
To understand the concepts in java
Idioma
English
Visitas
60
Etiquetas
java
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?