About 7,000,000 results
Open links in new tab
  1. What is the meaning of "this" in Java? - Stack Overflow

    this is a keyword in Java. Which can be used inside method or constructor of class. It (this) works as a reference to a current object whose method or constructor is being invoked. this keyword …

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

    43 The static keyword in Java means that the variable or function is shared between all instances of that class as it belongs to the type, not the actual objects themselves. So if you have a …

  3. java - What is the volatile keyword useful for? - Stack Overflow

    I came across the volatile keyword in Java. Not being very familiar with it, I found this explanation. Volatile variables are a simpler -- but weaker -- form of synchronization than locking, which...

  4. Var keyword in Java - Stack Overflow

    Jul 24, 2020 · With Java 10 or +, we can use var keyword for declaration. At initialization, a type is going to be inferred by the compiler. What happens when the class I instantiate and assign to …

  5. java - When should I use "this" in a class? - Stack Overflow

    Mar 10, 2010 · Offical java documentation page on this provides same use-cases. Within an instance method or a constructor, this is a reference to the current object — the object whose …

  6. Does Java have a "IN" operator or function like SQL?

    Jun 6, 2014 · The Java language is designed to be powerful but also simple. There is no such operator in Java at the language level, but certainly libraries have been written to facilitate …

  7. Why does Java have transient fields? - Stack Overflow

    May 26, 2009 · The transient keyword in Java is used to indicate that a field should not be part of the serialization (which means saved, like to a file) process. From the Java Language …

  8. Does Java have something like C#'s ref and out keywords?

    No, Java doesn't have something like C#'s ref and out keywords for passing by reference. You can only pass by value in Java. Even references are passed by value. See Jon Skeet 's page …

  9. 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. …

  10. java - What does 'synchronized' mean? - Stack Overflow

    Jul 6, 2009 · 35 Overview Synchronized keyword in Java has to do with thread-safety, that is, when multiple threads read or write the same variable. This can happen directly (by accessing …