Bifalgorithm post · Computer science one · Void Methods
What is a void method in Java?
What is a void method in Java? (Computer science one · Void Methods) — "The keyword void can be used in Java to indicate a method does not return a value, in w…
Ideas in this flowchart
- Java void methods
- The keyword void indicates that a method does not return a value.
- A method with void as its return type is called a void method.
- Although it is not necessary, including a return statement is good practice.
- Example: public static void printCopyright()
- The example method has no input parameters.
- The method prints “(c) Bourke 2015”.
- The example includes the statement return;.