- public final Class getClass()returns the Class
class object of this object. The Class class
can further be used to get the metadata of
this class.
-public int hashCode()returns the hashcode
number for this object.public boolean equals(
is a process of executing multiple threads Object obj)compares the given object to this
simultaneously. object.
Multithreading -protected Object clone() throws
thread is a lightweight sub-process, the CloneNotSupportedExceptioncreates and
smallest unit of processing returns the exact copy (clone) of this object.
-public String toString()returns the string
representation of this object.
-public final void notify()wakes up single
ypes of Exception:
T
thread, waiting on this object's monitor.
-public final void notifyAll()wakes up all the
Checked Exception. --directly inherit the
he Object class is the parent class of all the
T ethods of Object class
M threads, waiting on this object's monitor.
Throwable class except RuntimeException
and Error are known as checked exceptions.
Object class classes in java by default. In other words, it is -public final void wait(long timeout)throws
the topmost class of java. InterruptedExceptioncauses the current
For example, IOException, SQLException,
thread to wait for the specified milliseconds,
etc. Checked exceptions are checked at
until another thread notifies (invokes notify()
compile-time.
eywords:
K or notifyAll() method).
-public final void wait(long timeout,int nanos)
Unchecked Exception--that inherit the
try throws InterruptedExceptioncauses the
RuntimeException are known as unchecked is one of the powerful mechanism to handle
catch current thread to wait for the specified
finally
exceptions. For example, the runtime errors so that the normal flow of Exception Handling milliseconds and nanoseconds, until another
ArithmeticException, NullPointerException, the application can be maintained.
throw thread notifies (invokes notify() or notifyAll()
ArrayIndexOutOfBoundsException, etc.
throws method).
Unchecked exceptions are not checked at
-public final void wait()throws
compile-time, but they are checked at
runtime.
Programming in java InterruptedExceptioncauses the current
thread to wait, until another thread notifies (
invokes notify() or notifyAll() method).
Error --Error is irrecoverable. Some example
of errors are OutOfMemoryError,
-protected void finalize()throws Throwableis
invoked by the garbage collector before
VirtualMachineError, AssertionError etc.
object is being garbage collected.
it is a way to create exact copy of an object. java.lang.Cloneable interface must be
here is only call by value in java, not call by
T
object clone The clone() method of Object class is used to implemented by the class whose object
clone an object. clone we want to create
reference. If we call a method passing a call by value
value, it is known as call by value.
t o work on math calculations like min(),
is a process in which a method calls itself
Math class max(), avg(), sin(), cos(), tan(), round(), ceil(),
continuously
Recursion floor(), abs() etc.
oolean-Boolean
b
char-Character
byte-Byte
short-Short t ypes:
t o convert primitive into object and object
-intInteger - Autoboxing
into primitive.
Wrapper class
long-Long -Unboxing
float-Float
double-Double