10
Awlex
8y

Only 10 kinds...

Comments
  • 19
    String s = "10";
  • 8
    class IntegerStringFactory {
    public static make(int value) {
    new IntegerString(value);
    }

    private static class IntegerString {
    private final int value;

    private IntegerString(int value) {
    this.value = value;
    }

    @Override
    public String toString() {
    return String.valueOf(value);
    }
    }
    }

    String s = IntegerStringFactory.make(1).toString();
  • 5
    @debug WTF 😮 that made me cringe !
  • 0
    var s = i.toString();
  • 2
    String s3 = i.ToString();
    or
    String s2 = "something I need to put before i" + i;
  • 2
    @Vikram exactly!
Add Comment