20 lines
675 B
Java
20 lines
675 B
Java
|
|
package pr2.auffrischung.quine;
|
|
|
|
public class Quine {
|
|
|
|
private static final String DATA = "package pr2.auffrischung.quine;%n%n"
|
|
+ "public class Quine {%n%n"
|
|
+ " private static final String DATA = \"%s\";%n%n"
|
|
+ " public static void main(String[] args) {%n"
|
|
+ " System.out.printf(data, %n"
|
|
+ " DATA.replace(\"\\\\\", \"\\\\\\\\\")%n"
|
|
+ " .replace(\"\\\"\", \"\\\\\\\"\"));%n }%n}";
|
|
|
|
public static void main(String[] args) {
|
|
System.out.printf(DATA,
|
|
DATA.replace("\\", "\\\\")
|
|
.replace("\"", "\\\""));
|
|
}
|
|
}
|