Java.Lang Namespace

Classes

TypeReason
AbstractMethodError Note that this can only occur when inconsistent class files have been loaded, since invoking an abstract method is a compile time error.
AbstractStringBuilderDocumentation for this section has not yet been entered.
ArithmeticExceptionThrown when the an invalid arithmetic operation is attempted.
ArrayIndexOutOfBoundsExceptionThrown when the an array is indexed with a value less than zero, or greater than or equal to the size of the array.
ArrayStoreExceptionThrown when a program attempts to store an element of an incompatible type in an array.
AssertionErrorThrown when an assertion has failed.
BooleanThe wrapper for the primitive type boolean.
ByteThe wrapper for the primitive type byte.
Character[Android Documentation]
Class These represent an ordinary class or interface as found in the class hierarchy.
ClassCastExceptionThrown when a program attempts to cast a an object to a type with which it is not compatible.
ClassCircularityError Note that this error can only occur when inconsistent class files are loaded, since it would normally be detected at compile time.
ClassFormatErrorThrown by a class loader when a class file has an illegal format or if the data that it contains can not be interpreted as a class.
ClassLoaderClassLoader is an abstract class that implements the common infrastructure required by all class loaders.
ClassNotFoundExceptionThrown when a class loader is unable to find a class.
CloneNotSupportedExceptionThrown when a program attempts to clone an object which does not support the Java.Lang.ICloneable interface.
CompilerDoes nothing on Android.
DeprecatedAnnotation type used to mark program elements that should no longer be used by programmers.
DoubleThe wrapper for the primitive type double.
EnumThe superclass of all enumerated types.
EnumConstantNotPresentExceptionThrown if an enum constant does not exist for a particular name.
ErrorError is the superclass of all classes that represent unrecoverable errors.
ExceptionException is the superclass of all classes that represent recoverable exceptions.
ExceptionInInitializerErrorThrown when an exception occurs during class initialization.
FloatThe wrapper for the primitive type float.
IAppendableExtensionsDocumentation for this section has not yet been entered.
ICharSequenceExtensionsDocumentation for this section has not yet been entered.
IllegalAccessError Note that this can only occur when inconsistent class files have been loaded.
IllegalAccessExceptionThrown when a program attempts to access a field or method which is not accessible from the location where the reference is made.
IllegalArgumentExceptionThrown when a method is invoked with an argument which it can not reasonably deal with.
IllegalMonitorStateExceptionThrown when a monitor operation is attempted when the monitor is not in the correct state, for example when a thread attempts to exit a monitor which it does not own.
IllegalStateExceptionThrown when an action is attempted at a time when the VM is not in the correct state.
IllegalThreadStateExceptionThrown when an operation is attempted which is not possible given the state that the executing thread is in.
IncompatibleClassChangeErrorIncompatibleClassChangeError is the superclass of all classes which represent errors that occur when inconsistent class files are loaded into the same running image.
IndexOutOfBoundsExceptionThrown when a program attempts to access a value in an indexable collection using a value which is outside of the range of valid indices.
InheritableThreadLocalA thread-local variable whose value is passed from parent to child thread.
InstantiationError Note that this can only occur when inconsistent class files are being loaded.
InstantiationExceptionThrown when a program attempts to access a constructor which is not accessible from the location where the reference is made.
Integer Implementation note: The "bit twiddling" methods in this class use techniques described in and
InternalErrorThrown when the VM notices that it has gotten into an undefined state.
InterruptedExceptionThrown when a waiting thread is activated before the condition it was waiting for has been satisfied.
JavaSystemProvides access to system-related information and resources including standard input and output.
LinkageErrorLinkageError is the superclass of all error classes that occur when loading and linking class files.
Long Implementation note: The "bit twiddling" methods in this class use techniques described in and
MathClass Math provides basic math constants and operations such as trigonometric functions, hyperbolic functions, exponential, logarithms, etc.
NegativeArraySizeExceptionThrown when an attempt is made to create an array with a size of less than zero.
NoClassDefFoundErrorThrown when the VM is unable to locate a class which it has been asked to load.
NoSuchFieldError Note that this can only occur when inconsistent class files are being loaded.
NoSuchFieldExceptionThrown when the VM notices that a program tries to reference, on a class or object, a field that does not exist.
NoSuchMethodErrorThrown when the VM notices that a program tries to reference, on a class or object, a method that does not exist.
NoSuchMethodExceptionThrown when the VM notices that a program tries to reference, on a class or object, a method that does not exist.
NullPointerExceptionThrown when a program tries to access a field or method of an object or an element of an array when there is no instance or array to use, that is if the object or array points to null.
NumberThe abstract superclass of the classes which represent numeric base types (that is Java.Lang.Byte, Java.Lang.Short, Java.Lang.Integer, Java.Lang.Long, Java.Lang.Float, and Java.Lang.Double.
NumberFormatExceptionThrown when an invalid value is passed to a string-to-number conversion method.
ObjectSee Effective Java item 10 for much more detail and clarification.
OutOfMemoryErrorThrown when a request for memory is made that can not be satisfied using the available platform resources.
OverrideAnnotation type used to mark methods that override a method declaration in a superclass.
Package Packages are managed by class loaders.
ProcessFor example, to run /system/bin/ping to ping android.com:
Process process = new ProcessBuilder()
       .command("/system/bin/ping", "android.com")
       .redirectErrorStream(true)
       .start();
   try {
     InputStream in = process.getInputStream();
     OutputStream out = process.getOutputStream();

     readStream(in);

    finally {
     process.destroy();
   }
 }
ProcessBuilderCreates operating system processes.
RunnableDocumentation for this section has not yet been entered.
RuntimeAllows Java applications to interface with the environment in which they are running.
RuntimeExceptionRuntimeException is the superclass of all classes that represent exceptional conditions which occur as a result of executing an application in the VM.
RuntimePermissionLegacy security code; do not use.
SecurityExceptionThrown when a security manager check fails.
SecurityManagerSecurity managers do not provide a secure environment for executing untrusted code.
ShortThe wrapper for the primitive type short.
StackOverflowErrorThrown when the depth of the stack of the running program exceeds some platform or VM specific limit.
StackTraceElementA representation of a single stack frame.
StrictMath[Android Documentation]
StringMultiple strings can share the same char[] because strings are immutable.
StringBufferThe majority of the modification methods on this class return this so that method calls can be chained together.
StringBuilderThe majority of the modification methods on this class return this so that method calls can be chained together.
StringIndexOutOfBoundsExceptionThrown when the a string is indexed with a value less than zero, or greater than or equal to the size of the array.
SuppressWarnings It is recommended that programmers always use this annotation on the most deeply nested element where it is actually needed.
Thread Each Thread has an integer priority that basically determines the amount of CPU time the Thread gets.
Thread.StateA representation of a thread's state.
ThreadDeathThreadDeath is thrown when a thread stops executing.
ThreadGroupThreadGroup is a means of organizing threads into a hierarchical structure.
ThreadLocalImplements a thread-local storage, that is, a variable for which each thread has its own value.
Throwable A Throwable can also include a cause, which is a nested Throwable that represents the original problem that led to this Throwable.
TypeNotPresentExceptionThrown when a program tries to access a class, interface, enum or annotation type through a string that contains the type's name and the type cannot be found.
UnknownErrorThrown when the VM must throw an error which does not match any known exceptional condition.
UnsatisfiedLinkErrorThrown when an attempt is made to invoke a native for which an implementation could not be found.
UnsupportedClassVersionErrorThrown when an attempt is made to load a class with a format version that is not supported by the VM.
UnsupportedOperationExceptionThrown when an unsupported operation is attempted.
VerifyErrorThrown when the VM notices that an attempt is made to load a class which does not pass the class verification phase.
VirtualMachineErrorVirtualMachineError is the superclass of all error classes that occur during the operation of the VM.

Interfaces

TypeReason
IAppendable Implementing classes can choose different exception handling mechanism.
ICharSequenceThis interface represents an ordered set of characters and defines the methods to probe them.
ICloneableThis (empty) interface must be implemented by all classes that wish to support cloning.
IComparable In addition, it is recommended (but not required) that if and only if the result of x.compareTo(y) is zero, then the result of x.equals(y) should be true.
IIterableInstances of classes that implement this interface can be used with the enhanced for loop.
IReadableRepresents a sequence of characters that can be incrementally read (copied) into a Java.Nio.CharBuffer.
IRunnableRepresents a command that can be executed.
Thread.IUncaughtExceptionHandlerImplemented by objects that want to handle cases where a thread is being terminated by an uncaught exception.