Java Written Code