J A V A Programing
1st Que:-
Write a Program in which create two packages P1 and P2. Define a class under P1 and then access it inside the package P2.
2nd Que:
Program to implement the above structure in inheritance and access the eat() method.
-- Structure has been attached above!
Attachments:
![](https://hi-static.z-dn.net/files/d82/3e28f828dc41321edc59a09038e89b64.jpg)
Answers
Answered by
22
Attachments:
![](https://hi-static.z-dn.net/files/d55/319581f67247957693443a53565dcf4b.png)
![](https://hi-static.z-dn.net/files/dec/cd8e3bf3cdc38ce425148d3ffe641d3c.png)
![](https://hi-static.z-dn.net/files/d5c/cb75ee2d24a09cc043b84aca08a85443.png)
![](https://hi-static.z-dn.net/files/d91/ad299c8c0b55f17c6dc733406539333a.png)
Similar questions