Fiveable
Fiveable

Non-void methods

Definition

Non-void methods are functions in programming that return a value after performing a specific task or calculation.

Analogy

Think of non-void methods as a vending machine. You input some money (arguments) and press the buttons (method call), and it gives you back a snack (return value).

Related terms

Return by value: This term refers to the process of returning a single value from a method.

Void methods: These are functions that do not return any value.

Control flow: Control flow determines the order in which statements are executed in a program.

"Non-void methods" appears in:

collegeable - rocket pep

Are you a college student?

  • Study guides for the entire semester

  • 200k practice questions

  • Glossary of 50k key terms - memorize important vocab



© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.


© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.