Kata potter in java