ADBRITE ads links
You are here: CodeIdol.com > Java > The Java Tutorial Fourth Edition: A Short Course on the Basics > Classes And Objects
The Java Tutorial Fourth Edition: A Short Course on the Basics
| Chapter 4. Classes and Objects
WITH the knowledge you now have of the basics of the Java programming language, you can learn to write your own classes. In this chapter, you will find information about defining your own classes, including d...
|
|
| Classes
The introduction to object-oriented concepts in Chapter 2 used a bicycle class as an example, with racing bikes, mountain bikes, and tandem bikes as subclasses. Here is sample code for a possible implementation of a Bicycle class, to give ...
|
|
| Objects
A typical Java program creates many objects, which, as you know, interact by invoking methods.
Through these object interactions, a program can carry out various tasks, such as implementing a GUI, running an animation, or sending and rece...
|
|
| More on Classes
This section covers more aspects of classes that depend on using object references and the dot operator that you learned about in the preceding sections on objects:
Returning values from methodsThe this keywordClass vs. instance m...
|
|
| Nested Classes
The Java programming language allows you to define a class within another class. Such a class is called a nested class:
class OuterClass {
class NestedClass {
}
}
A nested class is a member of its enclos...
|
|
| Enum Types
An enum type is a type whose fields consist of a fixed set of constants. Common examples include compass directions (values of NORTH, SOUTH, EAST, and WEST) and the days of the week.
Because they are constants, the names of an enum typ...
|
|
| Annotations
Annotations provide data about a program that is not part of the program itself. They have no direct effect on the operation of the code they annotate.
Annotations have a number of uses, among them:
Information for the compiler Annot...
|
|
You are here: CodeIdol.com > Java > The Java Tutorial Fourth Edition: A Short Course on the Basics > Classes And Objects
|
|
Related tags
Popular Categories
Unix books and guides
AJAX popular information
C# language guides
Windows books and cookbooks
.......
|
|