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

What is public void?

Ava Hernandez | 2023-05-05 14:09:45 | page views:1039
I'll answer
Earn 20 gold coins for an accepted answer.20 Earn 20 gold coins for an accepted answer.
40more

Samuel Baker

Works at Microsoft, Lives in Redmond, WA
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:45

Lucas Brown

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