Can anyone tell me please how a computer understand the programing language? I mean if I write "turn(45)" inside the "turn" method then how does the computer know that it's time to turn the perticular picture/object?
public void turn(int turnAmt)
{
int rot = this.getRotation();
rot = rot + turnAmt;
this.setRotation(rot);
}public void setRotation(int newRot)
{
while (newRot < 0) newRot = newRot + 360;
while (newRot >=360) newRot = newRot - 360;