File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Access Modifier and Non access Modifier" Watch "Access Modifier and Non access Modifier" New topic

Access Modifier and Non access Modifier

Rahul Ba
Ranch Hand

Joined: Oct 01, 2008
Posts: 206
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.

[ 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.


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.

sudipto shekhar
Ranch Hand

Joined: Apr 02, 2008
Posts: 823

Good explanation Harvinder, go ahead!

Regards, Sud.
Darryl Burke

Joined: May 03, 2008
Posts: 5115

Just another cross poster.

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

Joined: Oct 13, 2005
Posts: 46437
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
I agree. Here's the link:
subject: Access Modifier and Non access Modifier
It's not a secret anymore!