I am doing very simple int division and I am getting odd results.
This code prints 2
as expected:
public static void main(String[] args) {
int i = 200;
int hundNum = i / 100;
System.out.println(hundNum);
}
This code prints 1
as not expected:
public static void main(String[] args) {
int i = 0200;
int hundNum = i / 100;
System.out.println(hundNum);
}
What is going on here?
(Windows XP Pro, Java 1.6 running in Eclipse 3.4.1)