Programming in Java: Practicing Access Modifiers on newest questions tagged java – Stack Overflow
I am trying to make a project with packages of classes with different access modifiers to see all the characteristics of classes with different access modifiers. I tried having a package with a public class, one with a default class and then tried to have 2 other for protected and private classes but it said “Illegal modifier for the class privatez; only public, abstract & final are permitted” for them. Why is this so. And secondly, is testing stuff for each class a good way to understand it. I am trying to give a better question than the previous post. I also want to learn application of each access modifier.
source: http://stackoverflow.com/questions/11165942/practicing-access-modifiers
Programming in Java: programming-in-java
Recent Comments