QuesHub > 方法 > 对象 > 堆栈 > ASK DETAIL

What is a public void in Java?

Isabella Ross | 2023-05-05 14:09:59 | page views:1087
I'll answer
Earn 20 gold coins for an accepted answer.20 Earn 20 gold coins for an accepted answer.
40more

Lucas Allen

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

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 .
ask:3,asku:1,askr:137,askz:21,askd:152,RedisW:0askR:3,askD:0 mz:hit,askU:0,askT:0askA:4