|
Page 13 of 14
NoClassDefFoundError is a subclass of java.lang.LinkageError. It occurs
when a JVM or a classLoader instance tries to load in the definition,
and no definition of the class is found. This occurs due to the
following reasons: Classpath has not been set properly. JVM tries to
load the......[read more]
The start() method belongs to the java.lang.thread class. When a thread
is instantiated, it is said to be in the newborn state until its
start() method is called. Calling the start() method does not actually
run the thread. However, it makes the thread eligible to run by moving
it from the......[read more]
An IllegalArgumentException extends from RuntimeException to indicate
that a method has been passed an illegal or inappropriate argument.
There are two kinds of constructors for IllegalArgumentException as
follows: public IllegalArgumentException( ) It constructs an......[read more]
Serializable is a marker interface. (A marker interface is one without
any method). The classes that do not implement this interface will not
have any of their states serialized or deserialized. Serialization is
the process of converting an object into byte stream, so that it can be
transferred......[read more]
An enumeration is a feature added to J2SE 5. It is very similar to a
class, except that it cannot be instantiated. It is declared using the
keyword enum. An enumeration can have constructors, methods, and
instance variables in the same way as a class. Identifiers of an enum
are referred to as......[read more]
Multithreading is a special kind of multitasking. It allows different
parts of a program to run concurrently. Different parts of the program
share the same memory space. Idle time of CPU is put to good use, so
that the efficiency of the CPU is enhanced. Different parts of the
program are so......[read more]
The FileOutputStream class is used to perform simple file output
operations. It is used to write binary data to a file. The
FileOutputStream class can be instantiated by using any of the
following constructors: FileOutputStream(String name) This constructor
creates a connection to write......[read more]
A finally block is used to execute a certain portion of code that must
be executed, irrespective of whether or not an exception is caught.
Even if a catch block is not found, a try block can still be used with
a finally block. It allows a programmer to avoid having cleanup code
accidentally......[read more]
A local variable is defined inside a block or a method. The lifetime of
such a variable is limited by the lifetime of the block in which it is
enclosed. It is necessary to initialize a local variable; otherwise, a
compile time error will occur. If the same name is used for an instance
variable as......[read more]
Polymorphism is a feature that allows an interface in Java to be used
by many classes for different purposes. The word polymorphism combines
poly with morphism, which means many forms. Some examples of
polymorphism are overloading and overriding. Polymorphism allows an
interface to be used for a......[read more]
|