Skip to content

Instantly share code, notes, and snippets.

@maxcai314
Created September 20, 2023 08:16
Show Gist options
  • Select an option

  • Save maxcai314/f18e26d1eb241af43d11de334afb2b37 to your computer and use it in GitHub Desktop.

Select an option

Save maxcai314/f18e26d1eb241af43d11de334afb2b37 to your computer and use it in GitHub Desktop.
java-quine
public class Quine {
public static void main(String[] args) {
// todo: make it print all the other stuff such as the psvm signature, etc.
String s = "String s = %s;System.out.printf(s, (char) 34 + s + (char) 34, ';')%s";System.out.printf(s, (char) 34 + s + (char) 34, ';');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment