Object Oriented Software Engineering   View all facts   Glossary   Help
subject > programming language construct > procedure > method > instance method
Next methodJava method    Upmethod    Previous methodhook method   

instance method comparison table
Subject refer to lack have have advantage be return to is a kind of is a subtopic of have example implement have return type override hide perform access by has part provide declare have high cohesion
Java instance methodthe object itself using the 'this' keywordside effects if it does not modify any data, and does not leave behind any information, other than its result, that would have an effect on other computationsa comment at its head if the method is non-obviouswhen using a certain procedure, a programmer does not need to worry about all the details of how it performs its computations; he or she only needs to know how to call it and what it computespublic except for those that will definitely need to be called from outside the packageits caller from only one place which should be the last statementJava methodThe Basics of Java
public float credit(float amountToCredit)
{
balance = balance + amountToCredit;
return balance;
}
 void if it does not return anythinga method in a superclass with the same namethe details of proceduresa special-purpose function such as the user interface for a particular systemother methods and variables in any class in the same package by defaultreturn typeprocedural abstractionpublic, protected or privateif related aspects of a system are kept together in this module, and unrelated aspects are kept out

Next methodJava method    Upmethod    Previous methodhook method