198k views
3 votes
How to call a void method with no parameters IN JAVA?

User AndHeiberg
by
5.2k points

1 Answer

0 votes

Step-by-step explanation:

SanfoundryMenu

Java Program to Illustrate a Method without Parameters and Without Return Type

« PrevNext »

This is a Java Program to Illustrate a Method without Parameters and Without Return Type.

We have made the method to calculate area. We call this method from main method and then enter the radius of the circle as input. Now we calculate area and print the output.

Here is the source code of the Java Program to Illustrate a Method without Parameters and Without Return Type. The Java program is successfully compiled and run on a Windows system. The program output is also shown below

User Viktor Be
by
5.3k points