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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"modifier static not allowed here"

Status
Not open for further replies.

lowbk

Technical User
Nov 26, 2001
162
SG
hi guys, need some advice on this fragment of code
-------------------------------------------------
package diabetesclinic;

//importing necessary libraries

public static class TERMMANAGER
{
public Hashtable getall(int x)
{
Hashtable mappinghash = new Hashtable();
//remaining coding here

return mappinghash;
}
}
----------------------------------------------
i'd placed this java file in a folder named "diabetesclinic" but when I tried compiling, I get "modifier static not allowed here".

is it because i'm not allowed to declare a static class within a package?
or is it because the way i'd declared it is wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top