Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • web technology Online Quiz - 121
  • package simplejava; public class TestConstructor1 { int p; Te...

package simplejava; public class TestConstructor1 { int p; TestConstructor1() { System.out.println("I am in Constructor"); } TestConstructor1(int p) { this.p =p; System.out.println("p = "+p); this(); } public static void main(String[] args) { TestConstructor1 tp1 = new TestConstructor1(10); } }

technology web technology
  1. p = 10

  2. p = 0

  3. Compiler Error

  4. Exception


Show answer
Correct Option: C

Find more quizzes:

© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy