MCQs > IT & Programming > Java > Output when this code is compiled and run? public class Test { static int a; int b; public Test () { int a, b, c; a = b = c = 20; System.out.println (a); } public static void main (String args[]) { new Test (); } }

Java MCQs

What will be the output when this code is compiled and run?

 public class Test
 {
 static int a;
 int b;
 public Test ()
 {
 int a, b, c;
 a = b = c = 20;
 System.out.println (a);
 }
 public static void main (String args[])
 {
 new Test ();
 }
 }

Answer

Correct Answer: 20 is printed

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it