Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 176
  • package simplejava; public class TestConstructor1 { int p; ...

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 programming languages
  1. Exception

  2. Compiler Error

  3. p = 0

  4. p=10


Show answer
Correct Option: B

Find more quizzes:

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