More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Ans. If the Object value will not change, use String Class because a String object is immutable.
If the Object value can change and will only be modified from a single thread, use StringBuilder because StringBuilder is unsynchronized(means faster).
If the Object value may change, and can be modified by multiple threads, use a StringBuffer because StringBuffer is thread safe(synchronized).
Ans. It is a Design Pattern that facilitates loose coupling by sending the dependency information ( object references of dependent object ) while building the state of the object. Objects are designed in a manner where they receive instances of the objects from other pieces of code, instead of constructing them internally and hence provide better flexibility.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Builder is a creational Design Pattern whereas Composite is a structural design pattern. Composite creates Parent - Child relations between your objects while Builder is used to create group of objects of predefined types.
Help us improve. Please let us know the company, where you were asked this question :
Ans. A has dependency of B, B has dependency of C and C has dependency of A
With Maven 2 , came transitive dependency wherein in above scenario, C will acts as a dependency of A as if this dependency has been defined directly in A but the negative side is that if it leads to cyclic dependency , it creates problems.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Tomcat is a web server and a Servlet container. It is often used as an application server for web-based applications but does not include the complete suite of capabilities that a Java EE application server would supply.
Help us improve. Please let us know the company, where you were asked this question :
LikeDiscussCorrect / Improve  tomcat   j2ee   web server   application server   build management
Ans. Builds can be triggered by source code management commits. Can be triggered after completion of other builds. Can be scheduled to run at specified time ( crons ) Manual Build Requests
Help us improve. Please let us know the company, where you were asked this question :
Ans. The best practice guideline between settings.xml and pom.xml is that configurations in settings.xml must be specific to the current user and that pom.xml configurations are specific to the project.
Help us improve. Please let us know the company, where you were asked this question :
Ans. By default, the location of the generated jar is in ${project.build.directory} or in your target directory. We can change this by configuring the outputDirectory of maven-jar-plugin.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Its used to execute last command. Yes this can be used with other string to execute new command. For eg - if ls was the last command, We can execute !! -l for having the long listing.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Transitive dependencies allows to avoid specifying the libraries that are required by the project which are specified in other dependent projects - Remote or Local.
Help us improve. Please let us know the company, where you were asked this question :