some java code to show how I code.