+ 1
JAVA - Invalid Method Declaration with two (2) input
Attached are the codes, kindly help to point out which function needed to fix. Thanks! P.S I have no knowledge to lil about JAVA prog. but I somehow understand the flow of the program. Was trying to know one to work. https://code.sololearn.com/c5djG86j3YfB/?ref=app
7 Réponses
+ 2
Line 31
Return type "double" missing
public static double computeChange() {
+ 2
Yes, but you have to define it in the function Signatur!
Like you have done it in all other functions.
+ 1
Its finally working, thanks!
+ 1
And also do proper formatting of your code so it will be more readable for others
+ 1
I just copied it to some documents just for try outs, gonna clean it up now that its working. Thanks!
0
Line no 31 it should be with return type u missed
public static double computeChange() {
double ch;
ch= payment- costtax;
return ch; }
0
You are returning value its correct but your function need any return type int ,float , double or void or anything if u dont want to write then make it constructor.
you have written only access specifiers see your other functions u have added return type properly