The void keyword

The void is a keyword defined in the java programming language.

Ads

The void 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 represents a null type.
  • The void keyword 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.

Syntex:  Here is the syntax that displays how to use the keyword void. 

public class Myclass {

public void doit() {

<statements>
<statements>
<statements>

return;

}

}

 

Advertisements

Share on Google+Share on Google+

The void keyword

Posted on: November 18, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

Ads
 

Discuss: The void keyword  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads