+ 6
What are the differences between, public,private and public specifiers
4 Answers
+ 21
These 3 are access modifiers...
If a class property is declared :
public: it can be used anywhere in the program..
protected: it can be used in the same class & derived class...
private : it can only be used in the class it is declared
u can find examples here đ
https://www.geeksforgeeks.org/access-modifiers-java/
https://www.sololearn.com/learn/Java/2156/?ref=app
+ 2
đDTđ You also have the access modifier: "package"
0
Try to search for "Access Modifiers" :). They declare where your class, method or variable can be used in your program.
0
these are the Access modifier in java, private access able within class, Public is access everywhere