This week's book giveaway is in the
We're giving away four copies of a choice of
"Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac"
and have Joe Kissell on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
about access specifiers
Joined: Jun 03, 2008
Jun 04, 2008 04:55:00
why can't we give private and protected specifiers for a class
while i am trying to give the specifires i got an error?
can any body explain me why ? thanks in advance
thanks and regards<br />Santhi Bharath<br />SCJP 5.0, SCWCD 5.0
Joined: Oct 13, 2005
Jun 04, 2008 05:20:00
That comes up quite frequently. Look at
I can't seem to find any more useful threads. Please ask again if you don't understand.
Jesper de Jong
Joined: Aug 16, 2005
Jun 04, 2008 06:39:00
Access control keywords such as "protected" and "private" are for class members only. Top-level classes are not members of any class.
Suppose you could make a top-level class private, then what is that supposed to mean?
Java Beginners FAQ
JavaRanch SCJP FAQ
The Java Tutorial
Java SE 8 API documentation
subject: about access specifiers
interface default accessability
Accessibility Modifiers for classes
Why we can't declare private and protected as access specifiers for a class
i am in cofusion
Inner classes and inheritance
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014