this has to go at the beginning of the code?
Yes.
could you tell me what it does?
It tells the jvm where to look for the definition of the HashMap class.
and what should this look like?
Like this:
Cashier()
{
accounts = new HashMap<String, Account>();
}