A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Badass: Making Users Awesome
this week in the
Java in General
Why we can't declare private and protected as access specifiers for a class
Joined: Sep 14, 2005
Sep 19, 2005 11:24:00
Why we can't use private and protected as access specifiers for a class.
Could you give me an example.
author and iconoclast
Joined: Jul 08, 2003
Sep 19, 2005 11:42:00
Because you can't. Why can't a variable be declared as both "int" and "double?" Same reason: because it can't.
Please don't start new threads to ask follow-on questions from other threads -- we already discussed this
I'm going to close this thread; followups in the original thread, please.
[Jess in Action]
I agree. Here's the link:
subject: Why we can't declare private and protected as access specifiers for a class
Accessibility Modifiers for classes
about access specifiers
Inner classes and inheritance
Use of Protected access specifier in real-life application
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015