Public Class | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Public Class

What happen if i dont declare the class? I mean, if i write class MyClass without "public" Thanks!

23rd Mar 2017, 2:02 AM
Maty Barreto
Maty Barreto - avatar
2 Answers
+ 1
In order for you to under this method correctly you would have to do some research on your own as well. I can start you off by saying they have to do with what is visible to the Class, other Class, Packages. For example: Public - Visible to the world. Protected - Visible to the package Private - Visible to only that class YouTube: https://www.youtube.com/watch?v=aRQRV2PMHtk
23rd Mar 2017, 2:08 AM
Reinard Cox
0
Thx a lot!
5th Apr 2017, 4:54 PM
Maty Barreto
Maty Barreto - avatar