I just started a diploma in software development. Right now we're starting out with basic Java and such (so right from the bottom you might say) - which is fine, I have no programming experience apart from knowing how to do "Hello World" in Java.

I keep hearing that mathematics is pertinent to coding, but how is it so? What general examples would show how mathematics and programming go together, or are reliant on one another?

I apologize of my question is vague, I'm barely starting to get a rough idea of the kind of world I'm stepping into as a code monkey student...


Question: Remove digit mark from float and convert to integer
Answer: Just the easiest way that comes up for me, but I assume that there could be easier ways to do that. But you can make it like a function.

String s = Float.toString(xx);
String[] temp=s.split("\\.");
yy=Integer.parseInt(temp[0]+temp[1]);