product java code