Please enable JavaScript to use CodeHS

AP Computer Science A (Nitro)

Lesson 2.6 Calling a Non-void Method

Description

In this lesson, students will learn how to call a non-void method and return a value from a method by using the keyword return. The return keyword returns a variable or value back to the existing program so it can be used further along in the program. This lesson corresponds with AP Computer Science A topic 2.5.


Objective

Students will be able to:

  • Create and call non-void methods with parameters and return values