Single Choice Not Set

QWhat is the output for the below code ?
class A{
      int k;
      boolean istrue;
      static int p;
      public void printValue(){
            System.out.print(k);
            System.out.print(istrue);
            System.out.print(p);
      }
}

public class Test{
      public static void main(String argv[]){
            A a = new A();
            a.printValue();
      }
}

ID: #2020 Java Data Types and Variables - MCQ 2,014 views
Question Info
#2020Q ID
Not SetDifficulty
Java Data Types and Variables - MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 0 false 0
  • B 0 true 0
  • C Compile error - static variable must be initialized before use.
  • D None of these
Correct Answer

Explanation

0 false 0

Share This Question

Challenge a friend or share with your study group.