Skip to main content
added 205 characters in body
Source Link
user18932
user18932

Java 8, 4949 41 bytes

Golfed:

n->System.out.println("\u004A\u0061\u0076\u0061""\112\141\166\141")

Ungolfed, full program:

public class OutputProgrammingLanguageName {

  public static void main(String[] args) {
    f(n->System.out.println("\u004A\u0061\u0076\u0061""\112\141\166\141"));
  }

  private static void f(java.util.function.IntConsumer f) {
    f.accept(0);
  }
}

This is a simple System.out.println() wrapped in a functional interface to save some bytes, using Unicodeoctal escapes to avoid any of the character literals in "Java". Note that on some JVM implementations, (note the question says this isSystem.out.print() does not necessarily flush output. In that case-sensitive, so the escape with "A"program will try to print but nothing is permissible)output before the program ends. Using System.out.println() requires two additional bytes, but guarantees the program actually prints something.

Java 8, 49 bytes

Golfed:

n->System.out.println("\u004A\u0061\u0076\u0061")

Ungolfed, full program:

public class OutputProgrammingLanguageName {

  public static void main(String[] args) {
    f(n->System.out.println("\u004A\u0061\u0076\u0061"));
  }

  private static void f(java.util.function.IntConsumer f) {
    f.accept(0);
  }
}

This is a simple System.out.println() wrapped in a functional interface to save some bytes, using Unicode escapes to avoid any of the character literals in "Java" (note the question says this is case-sensitive, so the escape with "A" is permissible).

Java 8, 49 41 bytes

Golfed:

n->System.out.println("\112\141\166\141")

Ungolfed, full program:

public class OutputProgrammingLanguageName {

  public static void main(String[] args) {
    f(n->System.out.println("\112\141\166\141"));
  }

  private static void f(java.util.function.IntConsumer f) {
    f.accept(0);
  }
}

This is a simple System.out.println() wrapped in a functional interface to save some bytes, using octal escapes to avoid any of the character literals in "Java". Note that on some JVM implementations, System.out.print() does not necessarily flush output. In that case, the program will try to print but nothing is output before the program ends. Using System.out.println() requires two additional bytes, but guarantees the program actually prints something.

Source Link
user18932
user18932

Java 8, 49 bytes

Golfed:

n->System.out.println("\u004A\u0061\u0076\u0061")

Ungolfed, full program:

public class OutputProgrammingLanguageName {

  public static void main(String[] args) {
    f(n->System.out.println("\u004A\u0061\u0076\u0061"));
  }

  private static void f(java.util.function.IntConsumer f) {
    f.accept(0);
  }
}

This is a simple System.out.println() wrapped in a functional interface to save some bytes, using Unicode escapes to avoid any of the character literals in "Java" (note the question says this is case-sensitive, so the escape with "A" is permissible).