0
can we made a class as private?
we all know, by default access modifier of a class is public but can we made the access modifier as private of a class if Yes/No then why?
3 Antworten
+ 1
sorry to correct u but default and public both are different access modifier with different properties. And yes we can make class private but not main class as it throw error at compile time.
0
yes, but if you do it as private, you can't be able to use out of the class where is this method
0
thans to correct me