Creating Objects

  • David Parsons
Chapter

Abstract

We have already seen that Java has both primitive types and reference types. We spent some time looking at primitive types in Chap. 3, but also introduced Strings and arrays, which are both reference types. Reference types include all kinds of classes, including user-defined types (e.g., BankAccount, InsurancePolicy, Customer), collection classes like Lists, simple data classes like Dates, and many more. There are a number of characteristics of reference types, but one general feature is that they are more complex data types than primitives, which just represent a single value. They are also represented by a reference that can refer to something in a specific area of memory.

Copyright information

© Springer-Verlag London Limited 2012

Authors and Affiliations

  • David Parsons
    • 1
  1. 1.Inst. of Information and Math. SciencesMassey UniversityAlbany, AucklandNew Zealand

Personalised recommendations