title: Difference between src/main/java and src/test/java in a Maven project
body: <p>While creating a new Maven project, the directories <code>src/main/java</code> and <code>src/test/java</code> are created. With some googling, I came to know that my <code>main</code> source code that I use for testing must be placed in <code>src/main/java</code>. But then, what is the purpose of two separate directories. The current answer on a similar question didn't help much. </p>