Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax to return a hashtable from a method?

Status
Not open for further replies.
Jan 8, 2001
163
US
Hi. I'll apologize up front for this question as I'm sure it's a simple one. I'm extremely new to JSP, Java classes etc.

My question is how can I return a hashtable from a method? In all of the examples I've found, the class which establishes and fills the hashtable is declared public so all of the other methods can see the hashtable. I would prefer to pass the hashtable to the calling object. Does anyone know the syntax for this?

ie/ Return HashtableName[]?

Thanks in Advance,
CrystalVisualBOracle (-:
 
Can't you just return the name of the modified HashTable? For example:

public Hashtable[] foo(HashTable[] tmp)
{
...
...
do stuff
...
...
return tmp;
}

The syntax is probably not right, but the idea is there.

Matthew J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top