154k views
0 votes
In Java, if the method returns void, a call to the method mustbe a:

a. method

b. statement.

c. main program call

d. global

User Omry Zobel
by
7.8k points

1 Answer

1 vote

Answer:

B - Statement

Step-by-step explanation:

A method returning void (not returning a function value) cannot be called through another method, expression or constant but would be called simply through an individual statement. E.g. when working with istream and ifstream >> cin.get( );

User Nicolas Dudebout
by
7.3k points