Home > Default > Acces specifiers and Access Modifiers in java

Acces specifiers and Access Modifiers in java

November 30Hits:0
Advertisement
what are Access specifiers?
what are Access modifiers?
Whether both of them are same or is there any difference?

Answers

As far as I know "access specifier" == "access modifier".
To me, they both mean "the Java Language word which specifies the visibility of a class or class attribute".
http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html
... but I'm no expert.
Cheers.

Read other 10 answers

Tags:

Related Articles

  • Acces specifiers and Access Modifiers in javaNovember 30

    what are Access specifiers? what are Access modifiers? Whether both of them are same or is there any difference?As far as I know "access specifier" == "access modifier". To me, they both mean "the Java Language word which specifie

  • Java class access modifiersNovember 30

    Why java class cannot have private and protected access modifiers?class X {   private class y {} }should compile just fine. A top-level private class makes no sense because you wouldn't be able to see it. As for protected, I don't know.Read other 5 a

  • Default/package/none access modifierNovember 30

    Hi, I was hoping for some discussion on the default/package/none access modifier. It's always really bugged me that we have public, private, protected, and then "none", while it seems to me that it would be less confusing, and more consistent to

  • Access Modifier: Only Subclass, not package wide?November 30

    Hello fellow programmers I'm looking for an access modifier that allows access to a method or member only from a class and it's subclasses. So it must be weaker than private because subclasses have access and stronger than protected because I don't w

  • Default access modifierNovember 30

    Hello, Can someone tell me what the default access modifier is in Java: -for methods -for member variables Thanks in advance, BalteoFriendly. Accessible to any other classes in the package.Read other 2 answers

  • Access modifiers ignored !?!November 30

    Hi please, have a look at the code below and let me know your opinions // ------------- source file 1 ------------------------ package pckg1; public class Dog {      final public static void main (String[] args) {           pckg2.Puppy puppy = new pc

  • Access modifiersNovember 30

    I dint understood the below question properly, please help me out....... You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective? A. public B. private C. prot

  • Access Modifiers, Package declarationNovember 30

    I created the following two classes in the same folder as two source files: A.java package abc; class A{ B.java package abc; class B extends A{ When I tried to compile, A compiled successfully. But when compiling B, it gives an error Cannot find symb

  • Old access modifiers persisting after recompileNovember 30

    Hello, I was following the Sun Tutorials for beginners and got to the exercise about developing Card and Deck classes (http://java.sun.com/docs/books/tutorial/java/javaOO/QandE/creating-answers.html). To see if I understood the concepts about access

  • Help with access modifiersNovember 30

    Hello all, i am a programmer hobbyist, did some schooling and can do alotta stuff but acess modifiers are greek to me i don't know when and what kind to use, just wondering if some can point me to a good place to learn access modifiers and when use t

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.634 s.