can you give some instructions that will help me to write a java code