Java View all facts Glossary Help |
| member > method > protected method |
| protected method | ||||
| subject | fact | |||
| protected method | can be accessed by code in the same package as this class as well as code in any subclasses, even if they are not in the same package ![]() | ![]() |
| can be overridden by public method in subclass | ![]() | |
| cannot be overridden by private method in subclass | ![]() | |
| is a subtopic of Methods | ![]() | |
| is a kind of method | ![]() | |
| must be protected or public in all subclasses | ![]() | |
| method |
![]() | ![]() |
| ![]() | |
![]() | ||
![]() | ||
![]() | ||
belongs to a class ![]() | ![]() | |
| can access all instance variables of all objects of its class | ![]() | |
can have an array as a parameter - see method parameter ![]() | ![]() | |
| can use the super method to invoke a method declared in the superclass | ![]() | |
cannot be passed as an argument to a method or constructor ![]() | ![]() | |
| creates an object by instantiating a class | ![]() | |
| does not return a value if it has a void return type | ![]() | |
| has part method definition | ![]() | |
| has part method signature | ![]() | |
| has part a block of implementation code | ![]() | |
| implements | ![]() | |
| is part of a class or an object | ![]() | |
may contain empty return statement if it has a void return type ![]() | ![]() | |
| may have access modifier | ![]() | |
must contain return statement unless it has a void return type ![]() | ![]() | |
| must define its parameter list | ![]() | |
| must define its return type | ![]() | |
| overrides a method in a superclass with the same name | ![]() | |
returns a value that is of the return type of the method or a subtype of that type ![]() | ![]() | |
| should have a comment at its head if the method is non-obvious | ![]() | |
should return to its caller from only one place which should be the last statement ![]() | ![]() | |
| usually hides instance variables, class variables from other objects | ![]() | |
| access unit | has access mode | ![]() |
| syntactic unit | has syntax rule bold = mandatory | ![]() |
Next method: public method Up: method Previous method: private method