Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

java hashmap 3 times the value

Options
  • 27-07-2007 4:22pm
    #1
    Registered Users Posts: 1,552 ✭✭✭


    Im using a jsp to get a value from a hashmap.

    The problem is the value it's getting is 3 times what it should be.

    What could cause that?


Comments

  • Registered Users Posts: 378 ✭✭sicruise


    Can you put up some of your code?

    The obvious answer is you multiplying it by 3 somewhere :)

    Are you using a jsp tag to itterate through the map?

    Try a bit of code like this, just to make sure you have the correct values in there...
    for ( String key : h.keySet() )
                {
                String value = h.get( key )
                System.out.println( "KEY : " + key + " VALUE : " + value );
                }
    

    Where h is a HashMap


  • Closed Accounts Posts: 161 ✭✭nude_hamster


    quinnd6 wrote:
    Im using a jsp to get a value from a hashmap.

    The problem is the value it's getting is 3 times what it should be.

    What could cause that?


    Ya a bit of code might help, right down and dandy :)


Advertisement