Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

java.lang.Void  RSS feed

 
Ranch Hand
Posts: 629
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Can someone please give me a sample example on how to use java.lang.Void class??

Thanks.
 
author
Posts: 23811
140
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its main use is as part of the reflection libraries. There is a static Class instance variable which is used to represent a void return value.

Henry
 
Arjun Reddy
Ranch Hand
Posts: 629
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Henry. Can you give me an example in code if possible?
 
Henry Wong
author
Posts: 23811
140
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, if you know how to use the reflection libraries, then you should know how to use the Void class. (considering all it is, is a place holder for the void class type)

If you don't know how to use the reflection libraries, maybe the Sun reflection tutorial is a good place to start.

http://java.sun.com/docs/books/tutorial/reflect/index.html

Henry
 
Arjun Reddy
Ranch Hand
Posts: 629
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I will do that Henry Thanks.
 
author
Posts: 8981
19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For anyone who is focused on the SCJP exam, you can relax - none of this is on any version of the exam.
 
Arjun Reddy
Ranch Hand
Posts: 629
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are the Author of the HeadFirst and certification Java books right wow.. nice to meet you sir. Thanks for the reply.
 
Sheriff
Posts: 21550
100
Chrome Eclipse IDE Java Spring Ubuntu VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's Bert alright. The guy helped me pass both my SCJP exams
Well, with Kathy Sierra of course, who is also a member of this board.
 
Won't you be my neighbor? - Fred Rogers. tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!