About 4,720,000 results
Open links in new tab
  1. In laymans terms, what does 'static' mean in Java? [duplicate]

    The static keyword can be used in several different ways in Java and in almost all cases it is a modifier which means the thing it is modifying is usable without an enclosing object instance. …

  2. What does the 'static' keyword do in a class? - Stack Overflow

    Since static methods also do not belong to a specific instance, they can't refer to instance members. In the example given, main does not know which instance of the Hello class (and …

  3. What is a "static class" in Java? - Stack Overflow

    Well, Java has "static nested classes", but they're not at all the same as C#'s static classes, if that's where you were coming from. A static nested class is just one which doesn't implicitly …

  4. java - When to use static methods - Stack Overflow

    Mar 6, 2017 · In Java, static methods are methods that belong to a class rather than an instance of the class. They are called on the class itself, rather than on an object created from that class.

  5. java - Difference between Static and final? - Stack Overflow

    Dec 7, 2012 · A static method cannot refer to this or super keywords in anyway. Static class Java also has "static nested classes". A static nested class is just one which doesn't implicitly have …

  6. java - What does the "static" modifier after "import" mean? - Stack ...

    Oct 2, 2008 · The static modifier after import is for retrieving/using static fields of a class. One area in which I use import static is for retrieving constants from a class.

  7. Why is the Java main method static? - Stack Overflow

    Sep 29, 2008 · Java 25 introduced alternative conventions (was a preview feature in Java 21-24); you can omit the String[] parameter, the public modifier, and even the static modifier. If you …

  8. java - What is the difference between a static method and a non …

    A static method belongs to the class itself and a non-static (aka instance) method belongs to each object that is generated from that class. If your method does something that doesn't depend …

  9. Java inner class and static nested class - Stack Overflow

    Sep 16, 2008 · What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these?

  10. java - What is the reason behind "non-static method cannot be ...

    A static method cannot tell to which particular object the non-static member belongs to. Since there is no existing object, the non-static method doesn't belong to any object. Hence there is …