A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
What is the usage of java.lang.Void Wrapper class?
Joined: Feb 02, 2006
Apr 11, 2007 00:20:00
I am unable to find a scenario where
wrapper class can be used.
Can you please help me in finding where
wrapper class can be used in my code?
Joined: Oct 30, 2001
Apr 11, 2007 01:29:00
One use - possibly the only one - is as the object returned by java.lang.reflect.Method.getReturnType(), for a method with void return type.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Joined: Feb 20, 2007
Apr 11, 2007 01:51:00
You can search for "java.lang.Void" in this forum as it has been discussed earlier. Basically you may understand it while getting the return type of a void method using reflection api.
[ April 11, 2007: Message edited by: srikanth ramu ]
Joined: Jan 01, 2007
Apr 11, 2007 08:07:00
Is it not also used in JNI to represent void return types from the native layer (assuming the native layer is C/C++).
Been awhile since I have used JNI.
I agree. Here's the link:
subject: What is the usage of java.lang.Void Wrapper class?
java.lang.Void wrapper class
What is the point of java.lang.Void.
java.lang.Void and void ??
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014