single step java calculator