Language: Java

<?php
//すべてのカードを配列に格納。
$mark = array("S ","H ","C ","D ");
$cardIndex = 0;
for($first = 0; $first < 4; $first++){
    for($second = 0; $second < 13; $second++){
        $hasCard[$cardIndex] = (String)($mark[$first].($second + 1));
        $cardIndex++;
    }
}
$intLength = trim(fgets(STDIN));
for($first = 0; $first < $intLength; $first++){
    $giveCard[first] = trim(fgets(STDIN));
}
for($first = 0; $first < count($hasCard); $first++){
    for($second = 0; $second < $intLength; $second++){
        $hasCard = array_diff($giveCard, array($giveCard[$second]));
        $hasCard = array_values($hasCard);
    }
}
for($first = 0; $first < count($hasCard); $first++){
    echo $hasCard[$first];
    echo "<br />";
}
?>



Compiler output:
Main.java:1: error: class, interface, enum, or record expected
<?php
^
Main.java:4: error: class, interface, enum, or record expected
$cardIndex = 0;
^
Main.java:5: error: class, interface, enum, or record expected
for($first = 0; $first < 4; $first++){
^
Main.java:5: error: class, interface, enum, or record expected
for($first = 0; $first < 4; $first++){
                ^
Main.java:5: error: class, interface, enum, or record expected
for($first = 0; $first < 4; $first++){
                            ^
Main.java:6: error: class, interface, enum, or record expected
    for($second = 0; $second < 13; $second++){
                     ^
Main.java:6: error: class, interface, enum, or record expected
    for($second = 0; $second < 13; $second++){
                                   ^
Main.java:8: error: class, interface, enum, or record expected
        $cardIndex++;
        ^
Main.java:9: error: class, interface, enum, or record expected
    }
    ^
Main.java:12: error: class, interface, enum, or record expected
for($first = 0; $first < $intLength; $first++){
^
Main.java:12: error: class, interface, enum, or record expected
for($first = 0; $first < $intLength; $first++){
                ^
Main.java:12: error: class, interface, enum, or record expected
for($first = 0; $first < $intLength; $first++){
                                     ^
Main.java:14: error: class, interface, enum, or record expected
}
^
Main.java:15: error: class, interface, enum, or record expected
for($first = 0; $first < count($hasCard); $first++){
                ^
Main.java:15: error: class, interface, enum, or record expected
for($first = 0; $first < count($hasCard); $first++){
                                          ^
Main.java:16: error: class, interface, enum, or record expected
    for($second = 0; $second < $intLength; $second++){
                     ^
Main.java:16: error: class, interface, enum, or record expected
    for($second = 0; $second < $intLength; $second++){
                                           ^
Main.java:18: error: class, interface, enum, or record expected
        $hasCard = array_values($hasCard);
        ^
Main.java:19: error: class, interface, enum, or record expected
    }
    ^
Main.java:21: error: class, interface, enum, or record expected
for($first = 0; $first < count($hasCard); $first++){
                ^
Main.java:21: error: class, interface, enum, or record expected
for($first = 0; $first < count($hasCard); $first++){
                                          ^
Main.java:23: error: class, interface, enum, or record expected
    echo "<br />";
    ^
Main.java:24: error: class, interface, enum, or record expected
}
^
23 errors