Formatting Code Snippets on Free WordPress.com Account?

wordpress.com supports code syntax-highliting.
You can read all about it here: http://en.support.wordpress.com/code/posting-source-code/

for your specific example use:

[sourcecode language="java"]
package com.jameselsey.domain;

import java.util.ArrayList;
import java.util.List;
import com.google.android.maps.GeoPoint;
import android.app.Application;

/**
* This is a global POJO that we attach data to which we
* want to use across the application
* @author James Elsey
*
*/
public class GlobalState extends Application
{
private String testMe;

public String getTestMe() {
return testMe;
}
public void setTestMe(String testMe) {
this.testMe = testMe;
}
}
[/sourcecode]

Leave a Comment