-
What is a public void in Java?
方法
对象 堆栈
Questioner:Harper Perez 2023-05-05 14:09:59
The most authoritative answer in 2024
-

-
Zoe Peterson——Studied at University of Edinburgh, Lives in Edinburgh, UK
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 .
read more >>
About “方法、对象、堆栈”,people ask:
QuesHub is a place where questions meet answers, it is more authentic than Quora, but you still need to discern the answers provided by the respondents.