Sha256: bb47e8b4deea8125fe29e73df825f09f32a79053fd31a9da1027f50b22c886f5

Contents?: true

Size: 1.07 KB

Versions: 6

Compression:

Stored size: 1.07 KB

Contents

public class Quine
{
  public static void main(String[] args)
  {
    char q = 34;      // Quotation mark character
    String[] l = {    // Array of source code
    "public class Quine",
    "{",
    "  public static void main(String[] args)",
    "  {",
    "    char q = 34;      // Quotation mark character",
    "    String[] l = {    // Array of source code",
    "    ",
    "    };",
    "    for(int i = 0; i < 6; i++ )          // Print opening code",
    "        System.out.println(l[i]);",
    "    for(int i = 0; i < l.length; i++)    // Print string array",
    "        System.out.println( l[6] + q + l[i] + q + ',' );",
    "    for(int i = 7; i < l.length; i++)    // Print this code",
    "        System.out.println( l[i] );",
    "  }",
    "}",
    };
    for(int i = 0; i < 6; i++ )          // Print opening code
        System.out.println(l[i]);
    for(int i = 0; i < l.length; i++)    // Print string array
        System.out.println( l[6] + q + l[i] + q + ',' );
    for(int i = 7; i < l.length; i++)    // Print this code
        System.out.println( l[i] );
  }
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
polytrix-0.1.4 samples/sdks/java/challenges/Quine.java
polytrix-0.1.3 samples/sdks/java/challenges/Quine.java
polytrix-0.1.2 samples/sdks/java/challenges/Quine.java
polytrix-0.1.1 samples/sdks/java/challenges/Quine.java
polytrix-0.1.0 samples/sdks/java/challenges/Quine.java
polytrix-0.1.0.pre samples/sdks/java/challenges/Quine.java