void
A return type showing that a method returns no value.
What is void in Java?
void — A return type showing that a method returns no value.
class OrderCalculator {
int total(int price, int quantity) {
return price * quantity;
}
}
Level: Apprentice · More Java terms at this level
Updated