Creating New Objects
When you write a Java program, you define a set of classes. As you learned during Day 1, “Getting Started with Java,” classes are templates used to create objects. These objects, which also are called instances, are self-contained elements of a program with related features and data. For the most part, you use the class merely to create instances and then work with those instances. In this section, you learn how to create a new object from any given class.
- Day 3. Working with Objects
- from Sams Teach Yourself Java in 21 Days, Sixth Edition
- Publisher: Sams
- Released: August 2012
Share this highlighthttp://www.safaribooksonline.com/a/sams-teach-yourself/43797/