Make the object of B class then we access the property of both classes because parents class object has capability to access only parent classes property but child have its and parents class both but condition is Is-relationshp compulsory between the classes