Java reference codes