IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators

Before you can even consider tackling the interesting and challenging task of developing Java applications, you must understand the basics of the Java language. This section discusses the following:

All the examples in this section use the Remote System Explorer (RSE) component of WDSc for iSeries. Drill into the IFS and the Root File System. Create a new folder name i5Primer, then create a new file within that folder named Vehicle.java. Figure 26.3 shows the code for Vehicle.java.

Figure 26.3: Source code for Vehicle Java Class.

Lines of code that begin with // are considered comments.

The first close brace (}) ends the constructor method, and the second close brace ends the class. All classes will resemble this basic format. Examples throughout the rest of this chapter illustrate increasingly complex techniques.

Категории