public static void main(String[] args) { System.out.println(helloWorld()); } // https://stackoverflow.com/questions/15182496/why-does-this-code-using-random-strings-print-hello-world private static String helloWorld() { return IntStream.of(-229985452, -147909649) .mapToObj(Random::new) .map(ran -> IntStream.generate(() -> ran.nextInt(27)) .takeWhile(k -> k != 0) .map(k -> k + '`') .collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)) .collect(Collectors.joining(" ")); }
Hello Worldを生み出す乱数の種はどうやったら特定できるんだ?
ネタ元のコメントに seed を探すコードもあるよ! https://stackoverflow.com/questions/15182496/why-does-this-code-using-random-strings-print-hello-world
おめでと☆
ありがと!