homework by java