Hi all, I'm pretty new to Java and I had a couple quick questions
I'm trying to make a constructor that has two string arguments and a float as an argument, and then assign that argument to a variable. The strings work but I can't get the float to, I typed it as:
public Enter(String aa, String bb, float i){
var1 = aa;
var2 = bb;
zeroOne = i;
}
Also, later in the program I'm going to need to mutliply that variable (zeroOne) by a certain number - how would I go about doing that?
Thanks for the help, all
I'm trying to make a constructor that has two string arguments and a float as an argument, and then assign that argument to a variable. The strings work but I can't get the float to, I typed it as:
public Enter(String aa, String bb, float i){
var1 = aa;
var2 = bb;
zeroOne = i;
}
Also, later in the program I'm going to need to mutliply that variable (zeroOne) by a certain number - how would I go about doing that?
Thanks for the help, all
Last edited: