Having no modifier is not the same as a public modifier, you can only access the field from within the same class or package. Public allows access from anywhere.
See: Controlling Access to Members...
Type: Posts; User: helloworld922
Having no modifier is not the same as a public modifier, you can only access the field from within the same class or package. Public allows access from anywhere.
See: Controlling Access to Members...
Accessibility modifiers don't change accessibility inside a class, they're used to limit accessibility outside of the class.
For example, a private field can only be accessed within that class,...