I want to Define package private
access modifier in Java but the compiler doesn't agree like this:
package private Name;
How do I need to do this? thank you!
"Package private" or "default" visibility modifier in Java is achieved by leaving out the visibility modifier (not the type). i.e.
String name; // package private or default
public String name;
private String name;
protected String name;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With