Please enable JavaScript to use CodeHS

Chapter 2

Using Objects

2.4 Calling a Void Method with Parameters

Parameters

Defining a Method with Parameters

Calling a Method with Parameters

Pass By Value

Multiple Parameters

Why Use Parameters?

Parameter Order

Calculator

Method Overload

Moving a Point

Rectangle

Check Your Understanding

  1. Incorrect Correct No Answer was selected Invalid Answer

Exercise: More Operations

Vocabulary

Term Definition
Method overloading Methods can have multiple signatures. Java will use the correct signature based on the actual parameters used in a program.

Do you have feedback on this lesson? Let us know here
Rate this lesson:

Feedback on this lesson:

Issue found (optional):