MindIQ Academy
1 / 100
OCJP 21 (1Z0-830) - Classes and Objects - 100 MCQs

Question 1

What is the result of compiling and running the following code?

class Demo {
    int value;
    Demo() {
        value = 10;
    }
    public static void main(String[] args) {
        Demo d = new Demo();
        System.out.println(d.value);
    }
}