Methods: 1) Let's Watch A Video
Methods: 1) Let's Watch A Video
3) Compare
Compare your answers with your partner. You can use
expressions like:
Scope of Declarations
You have seen declarations of various Java entities, such as classes, methods, variables and parameters.
Declarations introduce names that can be used to refer to such Java entities. The scope of a declaration is
the portion of the program that can refer to the declared entity by its name. Such an entity is said to be “in
scope” for that portion of the program.
Method Overloading
Methods of the same name can be declared in the same class, as long as they have different sets of
parameters (determined by the number, types and order of the parameters) — this is called method
overloading. When an overloaded method is called, the Java compiler selects the appropriate method by
examining the number, types and order of the arguments in the call. Method overloading is commonly used
to create several methods with the same name that perform the same or similar tasks, but on different types
or different numbers of arguments.
Useful expressions:
What does ______ means?
I don't understand the meaning of ____. Can you explain it to me?
c) Method instructions, which does not take any arguments and does
not return a value.
[Note: Such methods are commonly used to display instructions to a
user.]
Public void instructions ()