Java void keyword example
- Details
- Written by Nam Ha Minh
- Last Updated on 21 August 2019   |   Print Email
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:
- 9 Rules about Constructors in Java
- 12 Rules and Examples About Inheritance in Java
- 12 Rules of Overriding in Java You Should Know
- 10 Java Core Best Practices Every Java Programmer Should Know
- Understand Interfaces in Java
- Understand how variables are passed in Java
- Understand encapsulation in Java
About the Author:

Comments