Java Programming/Keywords/void
< Java Programming < Keywordsvoid
is a Java keyword.
Used at method declaration and definition to specify that the method does not return any type, the method returns void
. It is not a type and there is no void references/pointers as in C/C++.
For example:
![]() |
public void method()
{
//...
return; // -- In this case the return is optional
}
|
See also:
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.