Posting code in Wordpress

You can use the HTML pre tags around the code in the Text mode (aka the source mode).

public class HelloWorld {

    public static void main(String[] args) {
        // Prints "Hello, World" to the terminal window.
        System.out.println("Hello, World");
    }

}

You can use the WordPress code tag. You can read about that at https://en.support.wordpress.com/code/posting-source-code/

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello, World");
    }

}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: