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-04-13 6:39

>>4
There is no duplicate code.
I just posted 2 versions of the same class.

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