This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Five Lines of Code and have Christian Clausen on-line!
See this thread for details.
Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Access specifiers & Access Modifiers

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In some book its given Access Specifiers as private,protected,public, while others its given as static,final,etc etc.....

More logically, i think Access Specifiers are public private protected.....

and access Modifiers as static,final etc etc.....


Am i right?
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Manoj Mani:
In some book its given Access Specifiers as private,protected,public, while others its given as static,final,etc etc.....

More logically, i think Access Specifiers are public private protected.....

and access Modifiers as static,final etc etc.....


Am i right?




Manoj:

public, private, protected, static, final, volatile, transient, native, syncronized and abstract are all modifiers..

out of these, public, private, protected and default (no modifier) are visibility modifiers
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think

access modifiers means public,protectd etc

and

no-access modifiers means static final etc
 
Raghav Aggarwala
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
per my understanding
 
Manoj Mani
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Raghav...........So there is nothing like access specifiers in Java?
 
sharan vasandani
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
access specifier =access modifier=visibility modifiers
 
Raghav Aggarwala
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manoj,

I agree with you that some books do mention access modifiers as static, final, public, native etc...

access == visibility ???
I don't know because native, syncrhonized are access modifiers but i don't think they will fall under word visibility.

but the visibility modifiers are public , private, protected and default(no modifier).


Anyone who knows more about modifier, kindly advise.

Raghav
 
Raghav Aggarwala
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Raghav Aggarwala:
Manoj,

I agree with you that some books do mention access modifiers as static, final, public, native etc...

access == visibility ???
I don't know because native, syncrhonized are access modifiers but i don't think they will fall under word visibility.

but the visibility modifiers are public , private, protected and default(no modifier).


Anyone who knows more about modifier, kindly advise.

Raghav




I am sorry about the confusion.

Access modifiers = visibility modifier keywords are public, private, protected and default(no modifier).

Others keywords native, synchronized, static, final, abstract, transient, volatile are modifier keywords.

Source: Exam Cram 2 - Bill Brogden, Marcus Green book
It's not clear in the book also, but at no place, they have addressed modifiers other than public, private, protected and default ( no modifiers) as access modifiers.
 
sharan vasandani
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
final,abstract,strictfp are NONACCESS class Modifiers,

final,abstract,synchronized,transient,native,stricfp are NONACCESS Member modifiers.


this from SCJP 5 study guide by bates & kathy
 
This tiny ad is wafer thin:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic