what is the purpose of class "Object" which is base class
for all classes?
Answer Posted / vikki
The Object class sits at the top of the class hierarchy
tree in the Java development environment. Every class in
the Java system is a descendent (direct or indirect) of the
Object class. The Object class defines the basic state and
behavior that all objects must have, such as the ability to
compare oneself to another object, to convert to a string,
to wait on a condition variable, to notify other objects
that a condition variable has changed, and to return the
object's class.
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
What restrictions are placed on method overriding?
Should database connections be singleton?
Why are parameters used in functions?
Explain wrapper classes in java?
What does 3 dots mean in java?
What is flag in python?
Can you call one constructor from another if a class has multiple constructors?
How do you remove an element from an arraylist in java?
Is java util regex pattern thread safe?
Can we overload destructor in java?
2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?
Can we sort array in java?
Define how can we find the actual size of an object on the heap?
Explain about narrowing conversion in java?
What is return in java?