Java View all facts Glossary Help |
member > instance member > instance method > method that is declared in Object class |
method that is declared in Object class comparison table |
Subject | write for | is a subtopic of | see also | have purpose | is | have example | override | have | have default implementation | return | has definition |
---|---|---|---|---|---|---|---|---|---|---|---|
clone | Example Methods | to create objects from other objects of the same type | public float credit(float amountToCredit) { | a method in a superclass with the same name | specification | a value that is of the return type of the method or a subtype of that type | A method that creates objects from other objects of the same type | ||||
equals | Example Methods | to test whether two objects are equal i.e. they contain the same data, but are not necessarily the same object | overridden | boolean b = aPostalCode.equals(anotherPostalCode); | a method in a superclass with the same name | specification | a value that is of the return type of the method or a subtype of that type | A method that compares two objects for equality | |||
finalize | Garbage Collection | finalize method | public float credit(float amountToCredit) { | a method in a superclass with the same name | a comment at its head if the method is non-obvious | a value that is of the return type of the method or a subtype of that type | |||||
getClass | Example Methods | to increase efficiency by eliminating dynamic method lookup | //Returns the name of the class of the object called key String name = key.getClass().getName(); | by any method | specification | a runtime representation of the class of the object | |||||
notify | Example Methods | public float credit(float amountToCredit) { | a method in a superclass with the same name | specification | a value that is of the return type of the method or a subtype of that type | ||||||
notifyAll | Example Methods | public float credit(float amountToCredit) { | a method in a superclass with the same name | specification | a value that is of the return type of the method or a subtype of that type | ||||||
toString | every class you create | Example Methods | to convert any kind of object into a string | public float credit(float amountToCredit) { | a method in a superclass with the same name | specification | the name of the class followed by a hexadecimal code that distinguishes one instance from another | a String representation of the object to which it is applied | |||
wait method | Threads | public float credit(float amountToCredit) { | a method in a superclass with the same name | a comment at its head if the method is non-obvious | a value that is of the return type of the method or a subtype of that type |
Next instance method: sleep Up: instance method Previous instance method: join