ArrayList
class from the java.util
package.
This package also contains date and time facilities, random-number generator and other utility classes.
To import a whole package, end the sentence with an asterisk sign (*).
The example will import ALL the classes in the java .util |
|
Just like folders on your computer:
To create a package, use the package keyword:
|
|
Two hunters are out in the woods when one of them collapses. He’s not breathing and his eyes are glazed. The other guy whips out his cell phone and calls 914. “I think my friend is dead!” he yells. “What can I do?” The operator says, “Calm down. First, let’s make sure he’s dead.” There’s a silence, then a shot. Back on the phone, the guy says, “OK, now what?” |