dcsimg
Hi,
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   William_Sunil
Posted On:   Thursday, September 16, 2004 03:47 AM

I have one class defined by me and some where in my program i write a method with parameter as a class of that type which i wrote already. And now I want to call that method passing Hashtable as an argument.


Can i pass a Hashtable as an argument to a method which has a parameter as a user defined class type????

Re: Hi,

Posted By:   Amir_Pashazadeh  
Posted On:   Thursday, September 16, 2004 10:52 AM

Hi


Of course not!


You want to cast a java.util.Hashtable to something it is not.


Is your user defined type a java.util.Map? If it is so and you don't rely on its special signature in your method you can change your method's signature to get a java.util.Map as parameter and then you can pass Hashtable to it.


Amir Pashazadeh

About | Sitemap | Contact