If I am not mistaken, the following operation should yield 10.
public class whatever
{
int max = 1000;
int current = 100;
public static void main(String args[])
{
int percentage = current/max*100;
JOptionPane.showMessageDialog(rootPane,percentage);
}
}
Why does it yield 0? 100/1000 = 0.1 and then 0.1 * 100 = 10.