Table 6-1 defines and clarifies a few of the terms I will use in the next several sections.
Term | Definition |
---|---|
class | The term class has two meanings: 1) a class is an object-oriented term used to denote groups of related entities (things or concepts) that share common traits, and 2) in Java, a class is a language construct that you use to create user-defined data types. A class is declared and defined within a Java source file. Java source files have a .java extension. A source file can contain many class declarations and definitions but only one of the classes can be declared to be public. The name of the source file must be the exact same name as this public class with the addition of the .java extension. Example: The class named TestClass might be defined to be: public class TestClass{ } The name of the source file would be TestClass.java |
class file | When a source file is compiled with the javac compiler tool it results in one or more files that contain executable byte code. These byte code files have the extension .class. Example: When the source file TestClass.java is compiled with the javac compiler it will result in a file named TestClass.class. |
object | The term object has several meanings as well: 1) an object is an object-oriented term used to denote entities within a problem domain, 2) in Java, an object is an instance of a class type, and 3) the word object can also mean the region of memory occupied by the data associated with an instantiated data type. |