Created
November 13, 2015 20:29
-
-
Save FlorianCassayre/1caba198f2357e7986eb to your computer and use it in GitHub Desktop.
Quick Quine on Processing (Java)
This file contains 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 Florian Cassayre | |
*/ | |
void setup() | |
{ | |
String[] string = { | |
"/**", | |
" * @author Florian Cassayre", | |
" */", | |
"void setup()", | |
"{", | |
"String[] string = {", | |
"};", | |
"String c = String.valueOf((char) 34);", | |
"for(int i = 0; i < 6; i++)", | |
"println(string[i]);", | |
"for(int i = 0; i < string.length; i++)", | |
"println(c + string[i] + c + (i - 1 != string.length ? ',' : c + c));", | |
"for(int i = 6; i < string.length; i++)", | |
"println(string[i]);", | |
"}", | |
}; | |
String c = String.valueOf((char) 34); | |
for(int i = 0; i < 6; i++) | |
println(string[i]); | |
for(int i = 0; i < string.length; i++) | |
println(c + string[i] + c + (i - 1 != string.length ? ',' : c + c)); | |
for(int i = 6; i < string.length; i++) | |
println(string[i]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment