A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Arduino in Action
this week in the
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
Programmer Certification (SCJP/OCPJP)
K&B: Classes can have only public or default access
Joined: Sep 23, 2008
Oct 13, 2008 13:20:00
in K&B (310-065)
Chapter 1: Declaration and Access Control
states that "Classes can have only pubic or default access"
I think, this is true for outer classes but not for inner classes.
Joined: Aug 27, 2008
Oct 13, 2008 22:01:00
Yes you are right!
If you see the section on
Class Declarations and Modifiers
in Chapter 1, it is clearly mentioned that inner classes will be discussed in a later chapter. And in chapter 1, only outer classes are considered.
Thanks,<br />Srilatha M
I agree. Here's the link:
- it saves me about five hours per week
subject: K&B: Classes can have only public or default access
Protected Class--> Error
Class access modifiers
Polymorphic method invocations
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013