0
About this program
I can't understand the error, can anyone tell me please. https://code.sololearn.com/cqoXpItsL9WO/?ref=app
4 Answers
+ 2
What makes double differs from float is the size of variable they can save. I think 100.12 best fit for double and not float..so do
double f = 100.12
Another thing is, you won't get any output in your code because the main() method is gone.
add a main method usinf
public static void main(String args[])
{
display();
}
Note: there's no System.out.println() when calling the method inside main, this can be explained due to the return type "void" of the display() method.
0
Okay thanks
0
Kindly make the "s" capital in String[] args. That is the only change I see, rest is fine.
Ignore it if you have altered the code.
0
Thanks