You are trying to convert a double value into an integer and dividing it by two. You are using Integer.parseInt. It will throw an Exception if the parameter is not an integer. Which means that passing a double will make it throw an exception.
1. Why are you using trim() ? 2. How can you convert a double to an integer ? (ever heard of rounding issues ?)
You'll need to think of this first. Won't post any code. Others may
Joined: Oct 25, 2005
don't worry, I am not asking for any codes...some pointers like this will help... the situation here is the value output is for instance 7.58, I should represent this to string format.....how could i use rounding in here?