3 ms·
Here's the same in Java: public class dispatch { public static void main(String args[]) { long s = System.currentTimeMillis(); int x = 0;
by ssmoot 15y ago
Here's the same in Java:
public class dispatch {
public static void main(String args[]) {
long s = System.currentTimeMillis();
int x = 0;
for(int i = 0; i < 1000000; i++)
x += i;
System.out.printf("%d in %d", x, System.currentTimeMillis() - s);
}
}
Just for kicks. I'm not a Java developer but I'd like to get decent at it some day in the near future. Feel free to school me. ;-)