To Documents

Some Java Classes and Methods


String Class
 
A String object consists of a sequence of unicode characters of type char. The list of char characters includes every character on a standard keyboard, but it also includes characters from all commonly used alphabets, modern and ancient.  Because the maximum size of a char variable is 2 bytes, Java cannot handle the newer 4 byte Unicode characters.  An important property of String objects is that they are immutable (cannot be changed).
 
Constructors

Methods

 
StringBuilder Class
 
Because String objects are immutable, making frequent changes to string objects can be time consuming because an entirely new String object must be created each time that a change is made.  A faster alternative is to use mutable StringBuilder objects to manage strings which change frequently.
 
Constructors
 

Methods
 

 
Integer Class
 
The Integer class is a wrapper class containing int values.  Wrapper classes also exist for each of the other primitive types: Byte, Short, Long, Float, Double, Character, and Boolean.
 
Constructors
 

Methods
 
Static Fields
 
Object Class
 
The object class is the parent class of all Java classes.  Object methods can be overridden in derived classes.
 
Object Constructor

Object Methods
 
ArrayList Class
import java.util.ArrayList;
Constructors
 

Methods
 
Scanner Class
import java.util.Scanner;
Constructors
 

Methods
 
Random Class
import java.util.Random;
Constructors
 

Methods
 

 
Color Class
The Color class is used to create colors for drawing with the Graphics class (described below).
import java.awt.Color;
Constructors
 

Methods
Static Fields
 

 
Font Class
 
The Font class is used to specify fonts for drawing strings with the Graphics class (described below).
import java.awt.Font;
Constructors
 

Methods
 

Static Fields
 

 
Graphics Class
 
The Graphic class is used to draw in an Applet or Component. Usually the Graphics constructor is not explicitly used; the Graphics context is created in the Applet or Component environment. The origin (0, 0) is in the upper left corner of the drawing region.
import java.awt.Graphics;
Constructors
 

Methods