Execute HQ9+/Java: Difference between revisions
m
Fixed syntax highlighting.
m (Note about Unicode trick) |
m (Fixed syntax highlighting.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1:
{{implementation|HQ9+}}{{collection|RCHQ9+}}
This [[Java]] program accepts input from a file named by its first argument, or std in if no arguments are given.
Note: A [[Unicode]] trick could be done to make this source code a quine (similar to the one done in [[RCHQ9+/Tcl]], but also replacing the literal 99's with "100 - 1").
<
import java.io.FileReader;
import java.io.InputStreamReader;
Line 46 ⟶ 47:
"1#One bottle|2#{0} bottles} of beer", n);
}
}</
|