Java experment