CSE1020 Lab 04

Part 1: Navigating APIs

The standard Java platform has about 3000 classes organized into approximately 200 packages so it is important that you learn how to efficiently navigate Java's API documentation.

Java API on Prism Labs

CSE has a local copy of the Java API that is usable at all times, including during tests:

http://www.cse.yorku.ca/common/java/api/index.html

Open the link above in a new tab or window.

 

The 3 Frames

You should see something resembling the image below.

Frame 1 lists all of the packages.
Frame 2 lists the classes in the selected package.
Frame 3 displays the API for the selected class.

To efficiently navigate the APIs, you:

  1. select the package in frame 1
  2. select the class in frame 2
  3. read the API in frame 3
 
 

Find the APIs

Try to find the following the APIs:

  1. java.math.BigInteger
  2. java.lang.Math
  3. java.awt.Color
  4. java.io.PrintStream
  5. java.text.DecimalFormat
  6. java.util.Scanner
 

The API for java.util.Scanner may be useful for the next part of the lab.

When you are satisfied that you know how to navigate the API documentation you should

continue to Part 2.