File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access Modifier and Non access Modifier

 
Rahul Ba
Ranch Hand
Posts: 206
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 231
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sudipto shekhar
Ranch Hand
Posts: 823
Chrome Eclipse IDE Oracle
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good explanation Harvinder, go ahead!
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just another cross poster.
http://forums.sun.com/thread.jspa?threadID=5355036
 
Campbell Ritchie
Sheriff
Pie
Posts: 47288
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic