The following whitepaper shall introduce to us the basic practices to be followed to write secure Java code. The following topics are touched on- general coding practices, input validation, output encoding, authentication and password management, session management, access control, cryptographic practices and error handling & logging. You will also learn how to prevent code injection via real world examples.