![]() |
![]() |
![]() |
![]() |
![]() |
|
Finally, you use keywords to indicate what sort of method you are defining:
static keyword indicates that the movieRating method
is a class method. If you were to leave out the static keyword,
you would define an instance method, as described in
Chapter 10.
public keyword indicates that any method, defined in any
class, can call the movieRating method. If you were to use the
protected or private keywords instead, you would indicate
that access to the movieRating method is restricted, as
described in Chapter 15.