In Java, the void keyword is used to indicate a method that does not return any value. For example:

public void doSomething() {
   // do something
   // no return
}

Related keyword: return. See all keywords in Java.

Other Recommended Tutorials:


About the Author:

is certified Java programmer (SCJP and SCWCD). He began programming with Java back in the days of Java 1.4 and has been passionate about it ever since. You can connect with him on Facebook and watch his Java videos on YouTube.

Add comment

   


JavaScript is currently disabled.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.