what is the public | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what is the public

22nd Nov 2016, 10:28 PM
jegr
5 Answers
+ 3
public keyword is a access modifier when you declare a method property or variable public then it can be accessed outside it otherwise they will be accessed through the class only
23rd Nov 2016, 4:01 AM
Sandeep Chatterjee
0
Please describe your question more detailed.
22nd Nov 2016, 10:30 PM
Andreas K
Andreas K - avatar
0
what is the public ? define of
22nd Nov 2016, 10:33 PM
jegr
0
If you mean public in a method such as: public void methodName (){} Then public is simply a modifier that dictates which parts of your program can access that method, class, or whatever else public is "attached" to.
22nd Nov 2016, 10:37 PM
Matthew Tomlin
Matthew Tomlin - avatar
0
everyone can access ur variable/methods... , it is like free :D
23rd Nov 2016, 1:56 PM
Ozan Karataş
Ozan Karataş - avatar