simple java program
void getdata(float a, float c)
public static void main(String args)
room obj=new room();
it shows following error..
getdata(float,float) in room cannot be applied to (double,double)
why does it mean?
this is not a java forum. But what the heck:
It means that 1.2 and 2.3 are double values and not float. java does not convert that automatically
sorry ..this is my first and last java ques here..but how are 1.2 and 2.3 float and not double..!!
In C++, you can append a f to the number to force it to being a float, as in:
Why do you want to use floats anyway?
Topic archived. No new replies allowed.