Skip to main content

Posts

git interview questions

GIT 1.What is the purpose of git stash drop? In case we do not need a specific stash, we use git stash drop command to remove it from the list of stashes. By default, this command removes to latest added stash To remove a specific stash we specify as argument in the git stash drop <stashname> command. 2. What is the HEAD in GIT? A HEAD is a reference to the currently checked out commit. It is a symbolic reference to the branch that we have checked out. At any given time, one head is selected as the ‘current head’ This head is also known as HEAD (always in uppercase). 3. What is the most popular branching strategy in GIT? There are many ways to do branching in GIT. One of the popular ways is to maintain two branches: master : This branch is used for production. In this branch HEAD is always in production ready state. develop : This branch is used for development. In this branch we store the latest code developed in project. This is work in progress code. On

Maven based Interview Question

1. What is Maven?          Maven is a software project management tool. It is open source software from Apache software foundation. It is used for building, reporting and documenting a Software project. It is mainly based on POM (Project Object Model). 2. What are the main features of Maven?           Some of the main features of Maven are: Simple : Maven provides simple project setup that is based on best practices. Fast : You can get a new project or module started in a few seconds in Maven. Easy to learn : Maven usage and commands are easy to learn across all projects. Therefore ramp up time for new developers coming onto a project is very less. Dependency management : Maven provides superior dependency management including automatic updates and transitive dependencies. Multiple Projects : You can easily work with multiple projects at the same time by using Maven. Large Library : Maven has a large and growing repository of libraries and metadata to use out of the box

Java Design Patterns Interview Questions part - 2

Java Design Patterns 1.What are the examples of  Interpreter design pattern in JDK?                          Interpreter design pattern is used to evaluate sentences in a language. E.g. In SQL we can use it to evaluate a query by evaluating each keyword like SELECT, FROM, WHERE clause. In an Interpreter implementation there is a class for each keyword/symbol. A sentence is just a composite of these keywords. But the sentence is represented by Syntax tree that can be  interpreted.  In JDK there are many places where Interpreter design pattern is used. Some of these are as follows: java.util.Pattern java.text.Normalizer Subclasses of java.text.Format: DateFormat, MessageFormat, NumberFormat Subclasses of javax.el.ELResolver: ArrayELResolver, MapELResolver, CompositeELResolver etc. 2. What are the examples of Mediator design pattern in JDK?                           By using Mediator pattern we can decouple the multiple objects that interact with each other. With a Mediato