• Post Reply Bookmark Topic Watch Topic
  • New Topic

Diff. between Access Specifiers and Access Modifiers?  RSS feed

 
sarma kiran
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have gone through some material,i got the following details. Please let me know whether this is correct or not... Thanks


Access Specifiers
They are used to set the visibility of a
class or variable or a method. Classes can be Public or
Default.Variables and methods can be
public,private,protected or default

Access Modifiers
They are used to optionally declare a
field.That is we can set access modifiers for class,method
or variables. Classes can have modifier like Abstract.
Methods can have abstract, native,synchronised etc..
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you go through the Java™ Language Specification index, you won't find "specifier," and private and protected and public are called modifiers.

You can have protected and private classes, but only inner or nested classes.
 
Amit Vakodkar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think we have reached to any Concrete Answers; Calling All BigWigs of Java.
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"cozmonaut" please read the important administrative private message I just sent you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!