aspose file tools*
The moose likes Beginning Java and the fly likes The wrapper class, Void Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "The wrapper class, Void" Watch "The wrapper class, Void" New topic
Author

The wrapper class, Void

Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

What can the wrapper class, Void, be used for? It seems to me that null would handle anything that I might want to use Void for.

-- Kaydell
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

Java has the reflection API, which allows a running JVM to ask about the classes it contains, and about their methods and their fields. If you ask the reflection API what type a void method returns, it will return the static field Void.TYPE . That is the only purpose of the Void class.


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The wrapper class, Void