// (from the Carter book)
//
// INTRODUCTION - PART B
//
// Almost all of the classes that we have been working with
// up till now have been from the java package called
// "java.lang". The class, "StringTokenizer", on the other
// hand, is in the package called "java.util". But, if a program
// were to need to use a method from a class outside of "java.lang",
// we must inform the compiler of this fact. One way to do
// so is to use an "import" statement at the beginning of the
// program. So, if we want to use the "StringTokenizer" class
// in a program, we must precede the program with this statement:
//
import java.util.StringTokenizer;
//
// or, as an alternative, we can write the "import" statement
// like this:
//
import java.util.*;
//
// This allows us to use ANY METHOD in ANY CLASS that is contained in
// the "java.util" package. This form of the "import" statement
// is, therefore, useful if we want to use more than one class
// from the "java.util" package.
public class StringTokenizerIntroPartB
{
public static void main (String[] args)
{
// Place your code here
} // main method
} // StringTokenizerIntroPartB class
No comments:
Post a Comment