Answer Posted / srinu
Object class:-
Class Object is the root of the class hierarchy. Every class
has Object as a super class. All objects, including arrays,
implement the methods of this class.
1)protected Object clone()
Creates and returns a copy of this object.
2) boolean equals(Object obj)
Indicates whether some other object is "equal to"
this one.
3)protected void finalize()
Called by the garbage collector on an object when
garbage collection determines that there are no more
references to the object.
4)Class<? extends Object> getClass()
Returns the runtime class of an object.
5) int hashCode()
Returns a hash code value for the object.
6)void notify()
Wakes up a single thread that is waiting on this
object's monitor.
7) void notifyAll()
Wakes up all threads that are waiting on this
object's monitor.
8) String toString()
Returns a string representation of the object.
9)void wait()
Causes current thread to wait until another thread
invokes the notify() method or the notifyAll() method for
this object.
10)void wait(long timeout)
Causes current thread to wait until either another
thread invokes the notify() method or the notifyAll() method
for this object, or a specified amount of time has elapsed.
11) void wait(long timeout, int nanos)
Causes current thread to wait until another thread
invokes the notify() method or the notifyAll() method for
this object, or some other thread interrupts the current
thread, or a certain amount of real time has elapsed.
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Can we define private and protected modifiers for variables in interfaces?
What are the three parts of a lambda expression? What is the type of lambda expression?
What is the significance of continue jump statement? Explain with an example.
In Java list the methods that can be overridden?
What is the collections api in java programming?
How many types of threads are there in java?
What is listnode in java?
What is the difference between a field variable and a local variable?
What is map and hashmap in java?
Which class is used by server applications to obtain a port and listen for client requests?
what is mena by object block any what is the use of that
What is java util?
What is loop in java?
What is difference between static class and singleton pattern?
Is set thread safe java?