Java, code demo