A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
video training course this week in the
Help needed with access specifiers
Joined: Jan 04, 2010
Jan 04, 2010 23:45:01
This is probably more of a design question.
How would we use
access specifers in designing a real world class.Java textbooks tend to give a rather rigid definition
In short i am looking for a REAL example.
Joined: Jan 12, 2009
Jan 05, 2010 00:04:55
It depends on a scenario,
usually i prefer to use private for all class instance variables,
protected for methods (mostly not variables) that can be accessed to same package
public for methods that can be accessed every where
My Website: [
] Cool your mind:[
] My Sally:[
Joined: Oct 13, 2005
Jan 05, 2010 04:29:05
And welcome to JavaRanch
It is sorta covered in the
JavaRanch Style Guide
subject: Help needed with access specifiers
Complete SCEA 5 Exam Survey /Free exam voucher $200 US Value
Sun to fire 3,000 employees
New way to attract indian techies
Does Scjp1.4 test AWT and IO?as I know AWT and IO will not be tested?Is it real?
What is the best data base to use?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015