About 291,000 results
Open links in new tab
  1. In laymans terms, what does 'static' mean in Java?

    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. Java is an …

  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 therefore which …

  3. java - what is the meaning of 'static' in a method header ... - Stack ...

    Mar 9, 2012 · The term static means that the method is available at the Class level, and so does not require that an object is instantiated before it's called. Because writeNumbers was being called from …

  4. What does 'public static void' mean in Java? - Stack Overflow

    Mar 5, 2010 · 162 What does public static void mean in Java? I'm in the process of learning. In all the examples in the book I'm working from public static void comes before any method that is being used …

  5. java - What is "static"? - Stack Overflow

    May 27, 2009 · The main method must be static, which means that applications run in a static context by default. One of the basic rules of working with static methods is that you can’t access a nonstatic …

  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. 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 have a …

  8. java - What is the "String [] args" parameter in the main method ...

    May 21, 2009 · That String[] args part may become optional in future versions of Java. Work is underway to allow for simplified declaration of main method. See JEP 463: Implicitly Declared …

  9. O que é o Static em Java? E Como usá-lo? [duplicada]

    Jul 20, 2020 · Tirado daqui. Em Java, você pode ter 3 coisas “static”: blocos de inicialização, variáveis/métodos e classes internas. Primeiro precisa entender o seguinte. Static é a mesma coisa …

  10. What does Static {} mean in the Java Syntax? - Stack Overflow

    Sep 6, 2016 · Static initializers aren't inherited and are only executed once when the class is loaded and initialized by the JRE. That means this static block will be initialized only once irrespective of how …