Java View all facts Glossary Help |
member > instance member > instance method > method that is declared in Object class > getClass |
getClass comparison table |
Subject | refer to | have | is a kind of | is a subtopic of | have example | implement | override | is an instance of | have purpose | place in | have access to | be part of | has definition | return | declare | operate on |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
final method | a comment at its head if the method is non-obvious | method | Methods | by any method | to increase efficiency by eliminating dynamic method lookup | a class or an object | A method that cannot be hidden or overridden | a value that is of the return type of the method or a subtype of that type | ||||||||
method that is declared in Object class | the object itself using the 'this' keyword | a comment at its head if the method is non-obvious | instance method | Methods | public float credit(float amountToCredit) { | the behaviour of the objects in the class | a method in a superclass with the same name | a class such that there is no needless duplication of it, and such that it is useful in all the subclasses of the class in which it is defined | every class variable of its class | a class | a value that is of the return type of the method or a subtype of that type | public, protected or private | the current object's instance variables | |||
getClass | the object itself using the 'this' keyword | specification | Example Methods | //Returns the name of the class of the object called key String name = key.getClass().getName(); | the behaviour of the objects in the class | by any method | method that is declared in Object class | to increase efficiency by eliminating dynamic method lookup | a class such that there is no needless duplication of it, and such that it is useful in all the subclasses of the class in which it is defined | every class variable of its class | a class | a runtime representation of the class of the object | public, protected or private | the current object's instance variables |