Chapter 2
- When creating a class think about the objects, what the object knows and what the object does.
- Things an object knows are called instance variables
- Things an object can do are called method
- classes are not objects they are used to construct them
- The dot operator gives you access to an object's state and behavior (instance variable and method)
- Java code is defined in a class
- A Java program is objects talking to other objects
- A class is like a blueprint
In this activity I created my first object. I used two classes, one for the type of objec i wanted to use and another to test my new class. I learned the tester class is where you put the main method, and in that in that in the main() method you create and access objects.One class is real and the other is a tester.
No comments:
Post a Comment