void Java Keyword

The void is a keyword defined in the java programming language

void Java Keyword

void Java Keyword

     

The void is a keyword defined in the java programming language. Keywords are basically reserved words which have specific meaning relevant to a compiler in java programming language likewise the void keyword indicates the following :

-- The void keyword in java programming language represents a null type.
--
The void keyword in java programming language is often used as the return type of a called method to indicate that this called method is not going to return any value to the calling method.

Example to use the void keyword in a class:

public class Cla

{

public void doit();

{

<statements>
<statements>
<statements>

return;

}

}