Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Help Java V The void keyword

Related Tutorials


 
 

Share on Google+Share on Google+

The void keyword

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

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;

}

}

 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 18, 2009

Related Tutorials

Discuss: The void keyword  

Post your Comment


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