• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class Void

 
chander shivdasani
Ranch Hand
Posts: 206
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you explain me the functionality of class Void.I read the documentation and it says "The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the primitive Java type void. "

I didnt understand what they meant by "uninstantiable placeholer class"

If anyone can explain me with an example then it will be very nice .

Regards,
Chander
 
Henry Wong
author
Marshal
Pie
Posts: 21437
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by chander shivdasani:
Can you explain me the functionality of class Void.I read the documentation and it says "The Void class is an uninstantiable placeholder class to hold a reference to the Class object representing the primitive Java type void. "

I didnt understand what they meant by "uninstantiable placeholer class"

If anyone can explain me with an example then it will be very nice .

Regards,
Chander



"unintantiable" means you can't instantiate one -- its constructors are private. "place holder" means it's purpose is to hold something -- in this case, the Class object for the void type.

As for an example, you need to understand the reflection libraries first (Or at least the Class class type). A code example would be meaningless without it.

Henry
[ December 15, 2008: Message edited by: Henry Wong ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic