About 50 results
Open links in new tab
  1. The use of visibility modifiers in Java - Stack Overflow

    3 You can only declare a public or default class (in case of top level classes only) in Java and these modifiers decide the accessiblity of the class. I also suggest you to see "Why can't a class or an …

  2. What is the difference between public, protected, package-private and ...

    Oct 19, 2008 · In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing …

  3. Understanding Java's protected modifier - Stack Overflow

    java visibility protected access-modifiers edited Aug 4, 2022 at 19:34 Matthias Braun 34.9k 27 158 177

  4. How does visibility work for Java nested classes?

    I'm trying to learn what visibility to assign to nested classes, besides what my IDE yells at me that I have to do. This can get arbitrarily complicated, so I need to understand the general rules.

  5. java - Making certain methods visible only to particular packages ...

    With the "package" access modifier, only classes in odp.proj will have access to the methods. But keep in mind that in Java, the access modifiers cannot be relied upon to enforce access rules because …

  6. java - Access modifiers inheritance: on abstract methods - Stack Overflow

    Dec 10, 2014 · 1 On one hand, I have an abstract class with an abstract method. On the other hand, I have a child class which overrides the abstract method and specifies the "public" access modifier to …

  7. What are the differences between private and protected visibility ...

    Sep 18, 2018 · I just started to learn the kotlin and got confused with the protected access modifier my doubt is what is the exact differences between private and protected access modifier in kotlin. I have …

  8. What is the default access modifier in Java? - Stack Overflow

    Jan 15, 2017 · From Java documentation If a class has no modifier (the default, also known as package-private), it is visible only within its own package (packages are named groups of related classes — …

  9. In Java, what happens when you have a method with an unspecified ...

    Feb 25, 2012 · Java has four levels of visibility: public, protected, (default), private Visible to the package. the default. No modifiers are needed. Visible to the class only (private). Visible to the world …

  10. Symbols in UML, C++, Java - Stack Overflow

    Sep 13, 2012 · 3 In Java, we have some modifiers: protected, public, private. In UML, they are #, +, -, respectively. My question is, what does the tilde ~ symbol mean in UML? And does it have any …