Java Beginner Question

Joined
Feb 5, 2009
Messages
1
Reaction score
0
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
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top