Definition Of A Java Program


Terminology

Table 6-1 defines and clarifies a few of the terms I will use in the next several sections.

Table 6-1: Terms And Definitions To Get You Started

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 image from book 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 image from book TestClass.java is compiled with the javac compiler it will result in a file named image from book 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.




Java For Artists(c) The Art, Philosophy, and Science of Object-Oriented Programming
Java For Artists: The Art, Philosophy, And Science Of Object-Oriented Programming
ISBN: 1932504052
EAN: 2147483647
Year: 2007
Pages: 452

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net