some practice on java