Question: what is the difference between long and long in java?
Answer: Java: Long (class) vs long (primitive) A Long is a class, or a reference type, defined in the standard library. It stores a reference to an object containing a value (a "box"). A long on the other hand, is a primitive type and part of the language itself.