August 2004
Intermediate to advanced
480 pages
9h 41m
English
Almost every time you write a new class file, you will want to give that class the powers provided by some existing external file that lives in another package. You can do that in one of two ways:
Specify the fully qualified class name every time you reference the class.
Import the class or the package containing the class, and then simply reference the class using its name. You do this using the keyword import.
If you have used Microsoft .NET, you should be familiar with this concept. In C#, you might write the following:
using System;
class MyClass {
public static void Main() {
Console.WriteLine("smeagol was here");
}
}
That's how you specify that you are going to use one or more of the classes ...
Read now
Unlock full access