Write a program that creates illustrates different levels of protection in classes/subclasses belonging to same package or different packages

Write a program that creates illustrates different levels of protection in classes/subclasses belonging to same package or different packages

Not executable here

Run this program in your device

Code of program1 in Package

Code of program2 in same Package

Code of program outside the package

Share:

1 comment:

  1. #edisuggestion
    In program2 make sure you add
    '''import Protection.Protectionpackage;''' first.

    ReplyDelete

Pageviews