Does Java make distinction between value type and reference type

user496949 picture user496949 · Mar 5, 2011 · Viewed 7.7k times · Source

C# makes distinction of those two. Does java do the same or differently?

Answer

ide picture ide · Mar 5, 2011

In Java, all objects and enums are reference types, and all primitives are value types. The distinction between the two is the same as in C# with respect to copy semantics, but you cannot define a new value type in Java.