File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 203
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: 813

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: 36508
    
  16
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: http://aspose.com/file-tools
 
subject: Access Modifier and Non access Modifier
 
Similar Threads
Nested Interface
Usage of members in Interface and Abstract
access modifiers.
Access Specifier vs Access modifier
static and abstract