0
In java what is the difference between public class and ordinary class?
Java programming
3 Respostas
+ 1
public class is accessible to all the other classes.
What do you mean by "ordinary" class?
0
Ordinary class means just class
0
By default, the "ordinary" classes visibility is package private, i.e. only visible for classes in the same package.
src: https://stackoverflow.com/questions/12336814/is-a-class-private-or-public-by-default-in-java-and-c/12336827#:~:text=By%20default%2C%20the%20classes%20visibility,classes%20in%20the%20same%20package.&text=The%20class%20has%20no%20visibility,them%20to%20the%20compilation%20unit.