What is a public void in Java?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Works at the International Monetary Fund, Lives in Washington, D.C., USA.
public means that the method is visible and can be called from other objects of other types. ... This means that you can call a static method without creating an object of the class. void means that the method has no return value. If the method returned an int you would write int instead of void .
2023-05-15 14:09:59
评论(499)
Helpful(122)
Helpful
Helpful(2)

Isabella Garcia
QuesHub.com delivers expert answers and knowledge to you.
public means that the method is visible and can be called from other objects of other types. ... This means that you can call a static method without creating an object of the class. void means that the method has no return value. If the method returned an int you would write int instead of void .