Java   View all facts   Glossary   Help
member > instance member > instance method > abstract method
Next instance methodjoin    Upinstance method    Previous instance methodsynchronized instance method   

abstract method
subjectfact 
abstract methodhas definition A method with no implementation    added by: JK, source: Sun Java Tutorial, reference: Tutorial, 2001-10-19 11:35:57.0
does not have part bodyadded by: JK, source: On To Java, 2001-10-19 11:35:57.0
has purpose to serve as a placeholder, indicating that subclasses must have concrete implementations    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:35:57.0
is a subtopic of Methods2001-10-19 11:35:57.0
is always overridden by a method in a subclassadded by: JK, source: On To Java, 2001-10-19 11:35:57.0
is created by marking it abstract    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:35:57.0
is a kind of instance methodsource: Sun Java Tutorial, 2001-10-19 11:35:57.0
may not be defined in a class that is not abstractadded by: JK, source: On To Java, 2001-10-19 11:35:58.0
must have overriding methods in all non-abstract subclasses with instances that call that method    added by: JK, source: On To Java, 2001-10-19 11:35:58.0
must not contain any executable statements in its body    source: Object Oriented Software Engineering by Lethbridge and Laganière, 2001-10-19 11:35:58.0
instance methodcan operate on the current object's instance variables2001-10-19 11:36:56.0
can refer to the object itself using the 'this' keyword2001-10-19 11:36:56.0
has access to every class variable of its class2001-10-19 11:36:56.0
has example
public float credit(float amountToCredit) {
balance = balance + amountToCredit;
return balance;
}   
2001-10-19 11:36:56.0
implements the behaviour of the objects in the class2001-10-19 11:36:56.0
is part of a class2001-10-19 11:36:56.0
may be declared public, protected or private    2001-10-19 11:36:56.0
should be placed in 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 defined2001-10-19 11:36:56.0
method    2001-10-19 11:37:21.0
2001-10-19 11:37:21.0
2001-10-19 11:37:21.0
2001-10-19 11:37:21.0
2001-10-19 11:37:21.0
belongs to a class    2001-10-19 11:37:21.0
can access all instance variables of all objects of its class2001-10-19 11:37:21.0
can be inherited by subclasses of its class    2001-10-19 11:37:21.0
can be accessed by other methods and variables in any class in the same package by default    2001-10-19 11:37:21.0
can use the super method to invoke a method declared in the superclass2001-10-19 11:37:21.0
cannot be passed as an argument to a method or constructor    2001-10-19 11:37:22.0
creates an object by instantiating a class2001-10-19 11:37:22.0
does not return a value if it has a void return type2001-10-19 11:37:22.0
has part a block of implementation code2001-10-19 11:37:22.0
is equivalent to the terms "function member" or "member function" which are used in C++    2001-10-19 11:37:22.0
is equivalent to the terms "routine", "function" or "method" which are used in non object-oriented programming languages    2001-10-19 11:37:22.0
may have access modifier 2001-10-19 11:37:22.0
overrides a method in a superclass with the same name2001-10-19 11:37:22.0
returns a value that is of the return type of the method or a subtype of that type    2001-10-19 11:37:22.0
should be as private as possible2001-10-19 11:37:22.0
should not be public except for those that will definitely need to be called from outside the package    2001-10-19 11:37:22.0
should return to its caller from only one place which should be the last statement    2001-10-19 11:37:23.0
usually hides instance variables, class variables from other objects2001-10-19 11:37:23.0
access unithas access mode2001-10-19 11:35:59.0
syntactic unithas syntax rule
bold = mandatory
italic = non-terminal
normal font = optional
2001-10-19 11:38:04.0

Next instance methodjoin    Upinstance method    Previous instance methodsynchronized instance method