Cognizant interview question

Difference between the access modifiers ? Difference between public private protected and default with an example.

Interview Answer

Anonymous

3 May 2017

with the help of a simple program I narrated.