Interview Questions and Answers for 'Build' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 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.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Build' - 43 question(s) found - Order By Newest

next 30
Very frequently asked in different variations. Frequently asked in Deloitte ( 2 feedback ) , HCL Tech ( 3 feedback ), TCS and Coginizant (CTS)
  Q1. Explain the scenerios to choose between String , StringBuilder and StringBuffer ?

or

What is the difference between String , StringBuilder and StringBuffer ?
Core Java
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).

  Sample Code for String

  Sample Code for StringBuffer

  Sample Code for StringBuilder

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   string class   string   stringbuilder   stringbuffer   String vs StringBuffer   String vs StringBuilder   String vs StringBuilder vs StringBuffer   StringBuffer vs stringBuilder     Asked in 29 Companies      basic        frequent

Try 3 Question(s) Test


Almost sure to be asked in every company using any Dependency Injection framework ( Spring, Guice etc )
  Q2. What is Dependency Injection or IOC ( Inversion of Control ) ?Design
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 :   

   Like         Discuss         Correct / Improve     design patterns   ioc ( Inversion of Control )  dependency injection     Asked in 83 Companies      intermediate        frequent


Very frequently asked. Usually difference between String,StringBuffer and StringBuilder is asked in different variations.
  Q3. Difference between StringBuffer and StringBuilder ?Core Java
Ans. StringBuffer is synchronized whereas StringBuilder is not.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   string   stringbuffer   string class   stringbuilder   synchronized   basic interview question   infosys technologies     Asked in 17 Companies      basic        frequent

Try 1 Question(s) Test


 Q4. Difference between Factory and Builder Design Pattern ?Design
Ans. Builder pattern is the extension of Factory pattern wherein the Builder class builds a complex object in multiple steps.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   design pattern   factory design pattern   builder design pattern     Asked in 1 Companies      expert


 Q5. Difference between Builder and Composite ?
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 :   

   Like         Discuss         Correct / Improve     java   design pattern   builder   composite   creational design pattern   structural design pattern


 Q6. What is a transitive dependency ? Can we override Transitive Dependency version and If Yes, how ?Maven
Ans. Transitive dependency is the dependencies not defined directly in the current POM but the POM of the dependent projects.

Yes we can override transitive dependency version by specifying the dependency in the current POM.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     maven   maven dependencies   maven transitive dependency   technical lead   build management


Usually asked to experienced developers.
 Q7. What is a cyclic dependency ?Maven
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 :   

   Like         Discuss         Correct / Improve     maven   dependencies   cyclic dependencies   transitive dependencies   build management     Asked in 1 Companies        frequent


 Q8. Which of the following is not a build tool or plugin ?

a. Maven
b. Ant
c. Gradle
d. svn
Tool
Ans. svn

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   build tools


 Q9. Is tomcat an application or Web server ?Server
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 :   

   Like         Discuss         Correct / Improve     tomcat   j2ee   web server   application server   build management


 Q10. What is Maven's order of inheritance?Maven
Ans. 1. parent pom
2. project pom
3. settings
4. CLI parameters

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     maven   build technologies   pom.xml   parent pom   project pom   build management

Try 1 Question(s) Test


 Q11. What is a Mojo?Maven
Ans. A mojo is a Maven plain Old Java Object. Each mojo is an executable goal in Maven, and a plugin is a distribution of one or more related mojos.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     maven   build technologies   mojo


  Q12. Write a method to check if input String is Palindrome?Core Java
Ans. private static boolean isPalindrome(String str) {

if (str == null)
return false;

StringBuilder strBuilder = new StringBuilder(str);

strBuilder.reverse();

return strBuilder.toString().equals(str);

}

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   string   stringbuilder   stringbuilder   string class   code   palindrome     Asked in 38 Companies      Basic        frequent


  Q13. Difference between jar , war and ear ?Java EE
Ans. Jar is Java Archieve i.e compressed Class or Class / Java files.

War comprises of compressed Servlet class files,JSP FIles,supporting files, GIF and HTML files.

Ear comprise of compressed Java and web module files ( was files ).

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   j2ee   jar   web development   war   ear   build management   release management     Asked in 12 Companies      basic        frequent


 Q14. What are the various ways in which build can be scheduled in Jenkins ?Jenkins
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 :   

   Like         Discuss         Correct / Improve     java   jenkins   build management   build manager


 Q15. What is a stable build ?Jenkins
Ans. A build is considered stable if it was built successfully and no publisher reports it as unstable.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     jenkins  build management


 Q16. What is the best practice configuration usage for files - pom.xml or settings.xml ?Maven
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 :   

   Like         Discuss         Correct / Improve     maven   build technologies   pom.xml   settings.xml   architecture   technical architect   technical lead   build management   build and release

Try 1 Question(s) Test


 Q17. How can I change the default location of the generated jar when I command "mvn package"?Maven
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 :   

   Like         Discuss         Correct / Improve     maven   build technologies   build management   build and release   release management


 Q18. How do I determine which POM contains missing transitive dependency?Maven
Ans. run mvn -X

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     maven   build technologies   pom   build management


 Q19. Difference between Encapsulation and Data Hiding ?
Ans. Data Hiding is a broader concept. Encapsulation is a OOP's centri concept which is a way of data hiding in OOP's.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   oops   oops concepts   encapsulation   data hiding   build management      basic


 Q20. Difference between Abstraction and Implementation hiding ?
Ans. Implementation Hiding is a broader concept. Abstraction is a way of implementation hiding in OOP's.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   oops   oops concepts   abstraction   hiding information   build management


 Q21. What is the difference between compile and install ?Maven
Ans. Compile compiles the source code of the project

whereas

Install installs the package into the local repository, for use as a dependency in other projects locally

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     maven   install   build management


 Q22. What is the use of !! command ? Can I use it with conjunction to some other string to complete a command ? Unix
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 :   

   Like         Discuss         Correct / Improve     unix   unix commands   !! unix command   build management   release management


 Q23. What are the benefits of transitive depency in Maven ?Maven
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 :   

   Like         Discuss         Correct / Improve     maven   maven repository   dependencies   transitive dependencies   build management


 Q24. Give an Example for Builder Pattern ?Core Java
Ans. String str = new StringBuilder().append("Buggy").append("Bread").toString();

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   builder pattern   design pattern   stringbuilder   string     Asked in 3 Companies

Try 1 Question(s) Test


 Q25. What technologies have you worked with for build management ?
Ans. Ant and Maven

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     build management   build technologies


 Q26. What is the difference between Maven, Ant and Jenkins ?Tool
Ans. Maven and Ant are Build Technologies whereas Jenkins is a continuous integration tool.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     maven   ant   jenkins   build technologies


 Q27. Have you created any build script yourself ?
Ans. Yes, I have worked on many build scripts in last few years.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     build management   build technologies   build scripts


 Q28. Which version control system you are using in your current project ?Tools
Ans. We are using SVN and Git Hub.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     build management   version control systems   configuration management   configuration manager   version control manager     Asked in 1 Companies


 Q29. What is continuous integration ?Process
Ans. Continuous integration or CI is the practice, of merging all developer working copies to a shared mainline several times a day.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     continuous integration   jenkins  hudson   build tools


 Q30. Write code for the usage of Builder Design Pattern
Ans. http://javasearch.buggybread.com/CodeSnippets/searchCodeSamples.php?&category=code&searchOption&keyword=964

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     builder design pattern  builder pattern  code  coding      intermediate


next 30

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: