Yes, that is the problem. Those new double variables are different from the parameters. Do this: delete those declarations use this: return (double)hours + (double)minutes; you don't need that intermediate time variable. That's called a cast. It takes the ints and casts them into double form.
Answers & Comments
Verified answer
I just do this:
double x = int.parseInteger(<your old variable>);
where <your old variable> is whatever the variable was. I hope this helps
Java Convert Double To Int
Double To Int Java
For the best answers, search on this site https://shorturl.im/gUwZg
Yes, that is the problem. Those new double variables are different from the parameters. Do this: delete those declarations use this: return (double)hours + (double)minutes; you don't need that intermediate time variable. That's called a cast. It takes the ints and casts them into double form.
To convert int into double, use cast, i.e., put (double) in front of the expression you want to convert;
example:
int i = 2;
double x;
x = (double)i;
x = (double) (i * 2 + 3);