About 553,000 results
Open links in new tab
  1. 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 …

  2. java - Qual é a diferença entre modificadores public, default ...

    Feb 21, 2015 · Não existe nenhuma regra, somente boas práticas. Vamos do começo. Pra começar existem somente 3 modificadores (private, protected e public), e com isso temos 4 níveis de …

  3. class - What are public, private and protected in object oriented ...

    Jun 20, 2009 · Public, private and protected keywords are used to specify access to these members (properties and methods) of a class from other classes or other .dlls or even other applications.

  4. java - Cual es la diferencia entre public, private, y no tener ...

    Sep 13, 2017 · En el código Java, las declaraciones de clase y variable y de método y constructor pueden tener "especificadores o modificadores de acceso", que pueden ser: public private protected …

  5. What does it mean for a method to be public/private/other in java?

    Jul 19, 2015 · A public method may have to call other methods to execute its behaviour. These other methods are thus intended for internal use, and ought to be marked private.

  6. Difference between the default access specifier and protected access ...

    Mar 26, 2012 · I was trying to learn java and when I went through access specifiers I had a doubt. What is the difference between the default one if none is specified and the protected access specifier in java?

  7. Best practice: ordering of public/protected/private within the class ...

    In general, private and protected members are less important to most people looking at the header file, unless they are considering modifying the internals of the class. Keeping them "out of the way" …

  8. Java OOP Public vs Private vs Protected - Stack Overflow

    Dec 11, 2011 · I understand what public, private, and protected do. I know that you are supposed to use them to comply with the concept of Object Oriented Programming, and I know how to implement …

  9. java - What are variables without public, private or protected declared ...

    In Java there are public, protected, package (default), and private visibilities; ordered from most visible to the least. If you do not specify it, by default the visibility is .

  10. Real example for access identifiers [public, protected, private]

    Feb 14, 2014 · Note Protected access gives the subclass a chance to use the helper method or variable, while preventing a nonrelated class from trying to use it. Public A class, method, constructor, …