• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

class Void

 
Ranch Hand
Posts: 206
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 23951
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic