Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the difference between void and Void in java

Shulou Source: shulou.com Published: 2022-06-02 03:59:24 10月02日 Update

This article mainly introduces "what is the difference between void and Void in java". In daily operation, I believe that many people have doubts about the difference between void and Void in java. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the question of "what is the difference between void and Void in java?" Next, please follow the editor to study!

Difference

Void

Method definition for no return value.

Void

Void is a wrapper method for void. Unlike other basic types of wrapper methods, Void cannot be instantiated. Void can also be used for methods that always return null or generics that return null.

At this point, the study on "what is the difference between void and Void in java" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Methods learning more packaging help different practical next basics examples articles theories knowledge articles types websites materials follow questions easy to use Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Microsoft MySQL Huawei Docker