aspose file tools*
The moose likes Java in General and the fly likes Why we can't declare private and protected as access specifiers for a class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

Why we can't declare private and protected as access specifiers for a class

Ramesh Pappala
Ranch Hand

Joined: Sep 14, 2005
Posts: 50
Why we can't use private and protected as access specifiers for a class.
Could you give me an example.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

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 here. I'm going to close this thread; followups in the original thread, please.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why we can't declare private and protected as access specifiers for a class