jAVA SuperClass is A SubClass is B Constructor for A is publ

jAVA

SuperClass is A

SubClass is B

Constructor for A is:

public A(int value1, int value2)
{}


How is this Constructor called from B? Assume the values for value1 and value2 are 2,10 respectively.

Solution

The Superclass constructor A is called from B using the following code in main

public static void main(string arts[])

{

B b = new B(2,10);

jAVA SuperClass is A SubClass is B Constructor for A is: public A(int value1, int value2) {} How is this Constructor called from B? Assume the values for value1

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site