Created
March 28, 2010 15:14
-
-
Save nicolasH/346798 to your computer and use it in GitHub Desktop.
A Quine in java, created from the definition in Wikipedia.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @author Nicolas Hoibian */public class QuineJava_NicolasHoibian {public static void main(String[] args) {String src = "/** @author Nicolas Hoibian */public class QuineJava_NicolasHoibian {public static void main(String[] args) {String src = \"#\";src = src.replaceFirst(new String(new char[] { 35 }), src);System.out.println(src.replaceAll(new String(new char[] { 92, 34, 35, 92, 34 }), new String(new char[] { 92, 92, 34, 35, 92, 92, 34 })));}}";src = src.replaceFirst(new String(new char[] { 35 }), src);System.out.println(src.replaceAll(new String(new char[] { 92, 34, 35, 92, 34 }), new String(new char[] { 92, 92, 34, 35, 92, 92, 34 })));}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment