haochuan's java  program