Answer Posted / kishor kommula
Every class by default extends Object.
Object class consist of various methods such as
clone,toString,getClass,finalize,notify,wait etc..
If you want to print your own object to the console you
must override the toString method...
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How do you achieve singleton?
What is variable length arguments in java?
What is the difference between the ">>" and " >>>" operators in java?
What is the difference between C++ and Java and your preferences?
If you do not want your class to be inherited by any other class. What would you do?
Is java still necessary?
What is better - 'bit-shift a value' or 'multiply by 2'?
What do u mean by variable?
Write an algorithm for quick sort?
Can we override private constructor in java?
What are the differences between processes and threads?
What is string manipulation?
What are the advantages of defining packages in java?
What is hash in java?
Why string is immutable or final in java