Template:Java

From HandWiki
Revision as of 10:44, 19 October 2019 by imported>Jworkorg (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


This template can be used to display Java code with syntax highlighting and a nice looking frame.

Usage

{{java|code=}}

Example

{{java|code=
for(int i=0; i<10; i++) {
    System.out.println("Hello!");
}
}}

renders as

Computer code
for(int i=0; i<10; i++) {
    System.out.println("Hello!");
}