wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Access Modifier and Non access Modifier Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Access Modifier and Non access Modifier" Watch "Access Modifier and Non access Modifier" New topic
Author

Access Modifier and Non access Modifier

Rahul Ba
Ranch Hand

Joined: Oct 01, 2008
Posts: 205
Hi all,

What is the difference between Access modifier and non-access modifier?

I know Access modifiers are
public, private, default, protected

Non-Access modifier are static, abstract, final, stritfp

Why static, abstract, final, stritfp are called no-acess modifier?

Thanks in advance.

Rahul
[ December 12, 2008: Message edited by: Rahul Ba ]
Harvinder Thakur
Ranch Hand

Joined: Jun 10, 2008
Posts: 231
Originally posted by Rahul:

Why static, abstract, final, stritfp are called no-acess modifier?


Firstly, it seems that this question has been put in the wrong forum. It should have gone to Java Beginners.

Just to give a brief overview:

Access modifiers like private, protected, public and default define the visibility of your class, member variable and methods for outside people accessing your code.

e.g.



On the other hand, the static, final, strictfp etc. serve a different purpose. I suggest you go through a good book for beginners and these concepts will be clear in a jiffy.


thanks
Harvinder
sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 818

Good explanation Harvinder, go ahead!


Regards, Sud.
SCJP 5 ScjpFAQ JLS
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

Just another cross poster.
http://forums.sun.com/thread.jspa?threadID=5355036


luck, db
There are no new questions, but there may be new answers.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38025
    
  22
Darryl is correct; read this FAQ. I think you got better answers on Sun!

There is no such thing as a default access modifier. To get default access (maybe better called package-private) you write thisThat's right, you don't write anything
 
jQuery in Action, 2nd edition
 
subject: Access Modifier and Non access Modifier
 
Similar Threads
static and abstract
access modifiers.
Usage of members in Interface and Abstract
Access Specifier vs Access modifier
Nested Interface