0
Public class or class
I’ve seen some java program use Public class, and just class, why is that
1 Réponse
+ 2
class --> default: private
It doesn't matter if you have only one class
public class --> it is visible to other classes / other classes have access
https://stackoverflow.com/questions/16779245/what-is-the-difference-between-public-class-and-just-class