• Post Reply Bookmark Topic Watch Topic
  • New Topic

classes  RSS feed

 
nitin sharma
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can we have two toplevel classes,one with protected access specifier and the other with the public access specifier?.
public is very much possible, please tell me about the other class.
 
nachiket deshpande
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No a toplevel class can not be protected.
it can be public,final, abstract or no access modifier.but cant be protected.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!