Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

"times 2" in Java?

Name: Anonymous 2009-04-11 18:16

import static java.lang.System.out;
public class Times2 {
  public static void main(final String[] args) {
    for (byte i = 1; i < 11; i++) {
      out.println(2 + " x " + i + " = " + 2 * i);
    }
  }
}


public class Times2 {
  public static void main(final String[] args) {
    for (byte i = 1; i < 11; i++) {
      System.out.println(2 + " x " + i + " = " + 2 * i);
    }
  }
}


Am I ENTERPRISE enough?

Name: Anonymous 2009-07-02 8:07

>>30
Well, C support adding functions at runtime anyway because of how much control you get over memory. If you ignore small implementation defined things such as the size of an integer in the standard, you can pretty well write a function into memory yourself at runtime and have it port to any major platform. Your argument fails anyway, because Java actually can add methods at runtime. You don't actually have to use an external compiler, you could write your own into the program so that it can translate your code into bytecode on the fly, and then use a class loader. I really don't see where your argument is coming from.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List