I have noticed that if don't write public
before a class its works same as like a public class
. I can't understand why so? It should show a error when I don't declare a class as public
, private
or protected
. But it works fine. What is the reason?