I am new and don't have a lot of hands on experience in java.
My question is suppose there is a team of 4 guys making a MVC application. Every evening each one of them create some JSP's, servlet's etc. Then they merge it all together. How they do that? Is there any tool involved to do so? If so where can I learn it(Is there any video tutorial available on youtube etc.)?
Your doubt is related to "Build/ Deployment and Software Configuration Management". There certain top notch Configuration/Versioning tools available like IBM Clearcase, Win CVS or free ones like Tortoise SVN, Subversion. These tools basically maintain a code repository(collection of resources like source code, documents on a network file system).
Every developer in the team takes code (which is to be modified) from this repository. This operation is called checkout. Once changes are done modified/new files are updated in the repository. This operation is called checkin. End of the day, the updated code in the repository is used to prepare build/package for deployment which will contain all the recent changes in the code. For all these tools there plugins available which can be integrated into IDEs like Eclipse.