I have a constructor whose parameters are both int
: Berries( int a, int b )
and I need to put a double
in the place of "a" in the code: Berries( 23.45, 6)
. I tried with cast, but it does not work.
Can you help me please ?
the ugly solution
new Berries((new Double(23.45)).intValue(),6)