Question: what is the difference between default and public in java?
Answer: If a class has no modifier (the default, also known as package-private), it is visible only within its own package. The public access modifier is identified using the keyword public. So if you have a class, method, constructor, interface that is declared public, those items can be accessed from anywhere.