Question: What will be the output of the code given below? class A { public int var1; public int var2; public A(int value) { }

What will be the output of the code given below? class A

 

What will be the output of the code given below? class A { public int var1; public int var2; public A(int value) { } this.var1 = value; public int method1() { } } return this.var2; class B extends A { public B() { } super(10); public int method1 (int value1) { } return this.var1; class C extends B ( public c(int valuel, int value2) { super(); this.var2= value2; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!