Java Reference Index

  1. Introduction
  2. Data Types
  3. Arrays
  4. Operators
  5. Program Control
  6. Classes
  7. Objects
  8. Interfaces
  9. Containers
  10. Class Structure
  11. Error Handling

    Program Types

  12. Applications
  13. Applets

    How To

  14. Type Conversions


  15. java.lang.reflect
  16. java.applet
  17. java.awt
  18. java.beans
  20. java.lang
  21. java.math
  23. java.rm
  26. java.text
  27. java.util
  28. java.servlet


  29. Object Class


  30. Terms
  31. Credits

java.lang Package


Runtime Class

Represents the Java runtime environment. Methods:

SecurityManager Class

Provides a programming interface along with some implementation for Java security managers. Methods:

  • checkAccess - "Verifies thread accesses".
  • checkExit
  • checkPropertyAccess - "Verifies access to the specified property".
  • checkRead
  • checkWrite
  • checkXXX - "The set of operations in the Java platform subject to the protection of the security manager.


  • SecurityException

String Class

The String class is used for constant strings. Methods:

  • charAt()
  • int indexOf(int char)
  • int indexOf(int char, int from)
  • int indexOf(String)
  • int indexOf(String string, int from)
  • int lastIndexOf(int char) - Used to find the location of the last occurance of a given character in a string and return the location as an integer.
  • int lastIndexOf(int char, int from)
  • int lastIndexOf(String)
  • int lastIndexOf(String string, int from)
  • int length() - Returns an integer value telling the string length.

StringBuffer Class

The StringBuffer class is used for strings that can change

  • charAt()
  • append
  • capacity() - Returns the total amount of space in the StringBuffer
  • insert(int, String) - Insert a String into a StringBuffer at an integer location.
  • int length() - Returns an integer value telling the string length.

System Class


  • err - This implements the standard error stream. It is a PrintStream (in the io package) which includes the methods associated with the print stream such as "println".
  • in - This implements the standard input stream.
  • out - This implements the standard output stream.


  • arraycopy(Object src, int sindex, Object dest, int dindex, int len) - Copy an array from a source array to a destination array.
  • currentTimeMillis()
  • exit() - Exit the Java runtime environment.
  • gc() - Suggests that the system run the garbage collector.
  • runFinalization() - Forces object finalization.
  • runFinalizersOnExit(boolean) - Specifies whether finalizers are run before the Java runtime environment exits.