About 11,900,000 results
Open links in new tab
  1. How to use references in Java? - Stack Overflow

    Jan 17, 2011 · Java Objects are always accessed by a reference. Like the primitive types this reference is passed by value (e.g. copied). Since everything a programmer can access in java …

  2. java - What are classes, references, and objects? - Stack Overflow

    Feb 10, 2012 · In Java, you can not access objects directly, you can only use references. Java does not copy or assign objects to each other. But you can copy and assign references to …

  3. What exactly is a reference in Java? - Stack Overflow

    Sep 4, 2015 · Java references are stongly typed: you can't "reinterpret" what lies on the other end of a reference unless you reinterpret it as a type that that object actually is. Also a short note …

  4. Is Java "pass-by-reference" or "pass-by-value"? - Stack Overflow

    Sep 3, 2008 · The Java Spec says that everything in Java is pass-by-value. There is no such thing as "pass-by-reference" in Java. The key to understanding this is that something like. Dog …

  5. java - Creating References to Objects - Stack Overflow

    Feb 19, 2013 · In Java, the new keyword returns a reference to a newly-constructed object. Therefore, in. String s = new String("foo"); the value of variable s is a reference to a String …

  6. java - What's the difference between primitive and reference types ...

    It storing an address of the object it refers to. Reference or non-primitive data types have all the same size. and reference types can be used to call methods to perform certain operations. …

  7. java - What is Object Reference Variable? - Stack Overflow

    Nov 25, 2015 · What is Object Reference variable in java? Simply, it is a variable whose type is an object type; i.e. some type that is either java.lang.Object or a subtype of java.lang.Object. …

  8. What is the meaning of "this" in Java? - Stack Overflow

    Dec 13, 2020 · 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 …

  9. How to do "call by reference" in Java? - Stack Overflow

    Jul 18, 2021 · From Java The Complete Reference by Herbert Shildt 9th edition: "When you pass an object to a method, the situation changes dramatically, because objects are passed by …

  10. Can I pass parameters by reference in Java? - Stack Overflow

    Jul 1, 2009 · Java is confusing because everything is passed by value. However for a parameter of reference type (i.e. not a parameter of primitive type) it is the reference itself which is …

Refresh