Introducing Methods

Introducing Methods As mentioned at the beginning of this chapter, classes usually consist of two things: instance variables and methods. The topic of methods is a large one because Java gives, them so much power and flexibility. In fact, much of the next chapter is...

The Complete Reference

The Complete Reference ThiS chapter continues our discussion of java.util by examining those classes and interfaces that are not part of the collections framework. These include classes that tokenize strings, work with dates, compute random numbers, and observe ....

Native Methods

Native Methods Although it is rare, occasionally, you may want to call a subroutine that is written in a language other than Java. Typically, such a subroutine exists as executable code for the CPU and environment in which You are working-s-that is, native code. For...

Using instance of

Using instance of  Sometimes, knowing the type of an object during run time is useful. For example, you 'might have one thread of execution that generates various types of objects, and another thread that processes these objects. In this situation, it might be useful...

Applet Fundamentals

Applet Fundamentals   All of the preceding examples in this book have been Java applications. However, applications constitute only one class of Java programs. The other type of program is the applet. As mentioned in Chapter 1, applets arc small applications that are...