Java's Types: Primitives vs Reference Types

In Java there are essentially two different kinds of types. The primitive type denotes non-nullable types like boolean, byte, sbyte, short, integer, float, and double. The reference type denotes all nullable types, typically known as "objects" which always have "Object" as their explicit or implicit super class, e.g. Integer, Double, YourVeryOwnBusinessObject, BusinessDao, PersonDto, RuntimeException, or Exception.

Actually null is a literal of the "null" type which has no name but can be assigned or cast to any reference type. However it cannot be assigned to primitive types. By default all reference types are initialized with null.

Comments

Popular posts from this blog

Tuning ext4 for performance with emphasis on SSD usage

NetBeans 6.1: Working with Google´s Android SDK, Groovy and Grails