Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

java objects cannot change?

Foo foo1 = new Foo();
Foo foo2 = foo1;
foo1.someField = "changed";
System.out.println(foo2.someField) // "changed"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #objects
ADD COMMENT
Topic
Name
9+7 =