java demo code and test code during java study