Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 2nd, 2006, 07:22 AM
Registered User
 
Join Date: Feb 2006
Location: bangalore, karnataka, India.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default disadvantages of protected access specifier

What are the disadvantages of Protected access specifier in java?

k.ram kishore
Reply With Quote
  #2 (permalink)  
Old August 7th, 2006, 08:30 PM
Friend of Wrox
 
Join Date: Jan 2006
Location: San Francisco, CA, USA.
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Bhavesh, what you describe is the default access modifier (when you don't specify public, private, or protected). Protected acts as public within the class and its subclasses, but is hidden outside of those two cases. I'd say the disadvantage to protected is that people can subclass your class and create public getters/setters for it, therefore removing the intention of the access modifier.

Jon Emerson
http://www.jonemerson.net/
Reply With Quote
  #3 (permalink)  
Old August 10th, 2006, 03:31 PM
Friend of Wrox
 
Join Date: Jan 2006
Location: San Francisco, CA, USA.
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Great, Bhavesh deleted his reply. How nice of him.

Jon Emerson
http://www.jonemerson.net/
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report 9 password protected mdb ACCESS sajid_rauf Pro VB Databases 2 July 27th, 2007 02:29 AM
Between And Specifier David Coulter Access VBA 9 July 19th, 2007 07:07 AM
sub report in a password protected access database aasheesh_jha Crystal Reports 0 January 2nd, 2007 07:09 PM
Protected access wourouds BOOK: Beginning Java 2 4 March 18th, 2004 03:27 AM
Access and embedding Password Protected Documents dkb Access 4 January 16th, 2004 09:11 AM



All times are GMT -4. The time now is 12:25 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.