Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1,9 @@
public class Foo { public int x = 0; }
void somefunction() {
Foo a; // this declares a reference to Foo object; if this is a class field, it is initialized to null
a = new Foo(); // this assigns a to point to a new Foo object
Foo b = a; // this declares another reference to point to the same object that "a" points to
a.x = 5; // this modifies the "x" field of the object pointed to by "a"
System.out.println(b.x); // this prints 5, because "b" points to the same object as "a"
}