Package java. lang contains the wrapper classes Boolean , Character , Integer , Long , Float , and Double serve this purpose. An object of type Double , for example, contains a field whose type is double, representing that value in such a way that a reference to it can be stored in a variable of reference type.