Week 14: Java Method Overloading, Java Scope, and Java Recursion Flashcards

1
Q

It allows different methods to have the SAME NAME, but different signatures where the signature can differ by the number of input parameters or type of input parameters, or a mixture of both.

A

Method Overloading

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Method overloading in Java is also known as:

A

Compile-time Polymorphism, Static Polymorphism, or Early binding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In Method overloading compared to the parent argument, the ____ argument will get the highest priority.

A

child

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

With _________, multiple methods can have the same name with different parameters:

A

method overloading

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Advantages of Method Overloading:

A
  1. Method overloading improves the Readability and reusability of the program.
  2. Method overloading reduces the complexity of the program.
  3. Using method overloading, programmers can perform a task efficiently and effectively.
  4. Using method overloading, it is possible to access methods performing related functions with slightly
    different arguments and types.
  5. Objects of a class can also be initialized in different ways using the constructors.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

In Java, variables are only accessible inside the region they are created. This is called ________.

A

scope

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Variables declared directly inside a method are available anywhere in the method following the line of code in which they were declared

A

Method Scope

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

It is the technique of making a function call itself.

A

Recursion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

This technique provides a way to break complicated problems down into simple problems which are easier to solve.

A

Recursion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Every recursive function should have a
________, which is the condition where the function stops calling itself.

A

halting condition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly