Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
In this round, I was first asked about the projects that I had mentioned in my Resume. I was also asked about the various tech stacks that I was familiar with and then the interviewer started asking me questions around Java and Java 8.
What are the advantages of Packages in Java?
There are various advantages of defining packages in Java.
i) Packages avoid the name clashes.
ii) The Package provides easier access control.
iii) We can also have the hidden classes that are not visible outside and used by the package.
iv) It is easier to locate the related classes.
Why Java is platform independent and JVM platform dependent?
JVM is platform dependent because it takes java byte code and generates byte code for the current operating system. So Java software is platform dependent but Java language is platform-independent because different operating systems have different JVMs.
Why are Java Strings immutable in nature?
String objects in Java are immutable by definition. This signifies that the String object's state cannot be changed once it has been created. As a result, if you try to update the value of that object rather than the values of that object, Java creates a new string object.
Because String objects are often cached in the String pool, Java String objects are immutable. Because String literals are frequently shared among numerous clients, one client's action may have an impact on the others. It improves the application's security, caching, synchronization, and performance by doing so.
How would you differentiate between a String, StringBuffer, and a StringBuilder?
1) Storage area : In string, the String pool serves as the storage area. For StringBuilder and StringBuffer, heap memory is the storage area.
2) Mutability : A String is immutable, whereas both the StringBuilder and StringBuffer are mutable.
3) Efficiency : It is quite slow to work with a String. However, StringBuilder is the fastest in performing operations. The speed of a StringBuffer is more than a String and less than a StringBuilder. (For example appending a character is fastest in StringBuilder and very slow in String because a new memory is required for the new String with appended
character.)
4) Thread-safe : In the case of a threaded environment, StringBuilder and StringBuffer are used whereas a String is not used. However, StringBuilder is suitable for an environment with a single thread, and a StringBuffer is suitable for multiple threads.
How does Java enable high performance?
1) In the Just-in-Time compilation, the required code is executed at run time.
2) Typically, it involves translating bytecode into machine code and then executing it directly. For enabling high performance, Java can make use of the Just-In-Time compilation.
3) The JIT compiler is enabled by default in Java and gets activated as soon as a method is called. It then compiles the bytecode of the Java method into native machine code.
4) After that, the JVM calls the compiled code directly instead of interpreting it. This grants a performance boost.
Difference between Abstract class and Interface.
The differences between Abstract Class and Interface are as follows :
Abstract Class :
1) Abstract classes have a default constructor and it is called whenever the concrete subclass is instantiated.
2) It contains Abstract methods as well as Non-Abstract methods.
3) The class which extends the Abstract class shouldn’t require the implementation of all the methods, only Abstract methods need to be implemented in the concrete sub-class.
4) Abstract class contains instance variables.
Interface :
1) It doesn’t have any constructor and couldn’t be instantiated.
2) The abstract method alone should be declared.
3) Classes that implement the interface should provide the implementation for all the methods.
4) The interface contains only constants.
What are some standard Java pre-defined functional interfaces?
Some of the famous pre-defined functional interfaces from previous Java versions are Runnable, Callable, Comparator, and Comparable. While Java 8 introduces functional interfaces like Supplier, Consumer, Predicate, etc. Please refer to the java.util.function doc for other predefined functional interfaces and its description introduced in Java 8.
Runnable : use to execute the instances of a class over another thread with no arguments and no return value.
Callable : use to execute the instances of a class over another thread with no arguments and it either returns a value or throws an exception.
Comparator : use to sort different objects in a user-defined order.
Comparable : use to sort objects in the natural sort order.
What are the advantages of using the Optional class?
Below are the main advantage of using the Optional class:
It encapsulates optional values, i.e., null or not-null values, which helps in avoiding null checks, which results in better, readable, and robust code It acts as a wrapper around the object and returns an object instead of a value, which can be used to avoid run-time NullPointerExceptions.
What are Java 8 streams?
1) A stream is an abstraction to express data processing queries in a declarative way.
2) A Stream, which represents a sequence of data objects & series of operations on that data is a data pipeline that is not related to Java I/O Streams does not hold any data permanently.
3) The key interface is "java.util.stream.Stream". It accepts Functional Interfaces so that lambdas can be passed. Streams support a fluent interface or chaining.
This round had questions revolving around OOPS , Jenkins, Spring Boot and Docker. The questions were preety decent and standard and can be answered if one has prior experience in the given tech stack.
What is Garbage collector in JAVA?
1) Garbage Collection in Java is a process by which the programs perform memory management automatically.
2) The Garbage Collector(GC) finds the unused objects and deletes them to reclaim the memory. I
3) In Java, dynamic memory allocation of objects is achieved using the new operator that uses some memory and the memory remains allocated until there are references for the use of the object.
4) When there are no references to an object, it is assumed to be no longer needed, and the memory, occupied by the object can be reclaimed.
5) There is no explicit need to destroy an object as Java handles the de-allocation automatically. The technique that accomplishes this is known as Garbage Collection. Programs that do not de-allocate memory can eventually crash when there is no memory left in the system to allocate. These programs are said to have memory leaks.
Garbage collection in Java happens automatically during the lifetime of the program, eliminating the need to de-allocate memory and thereby avoiding memory leaks.
In C language, it is the programmer’s responsibility to de-allocate memory allocated dynamically using free() function. This is where Java memory management leads.
What does the @SpringBootApplication annotation do internally?
The @SpringBootApplication annotation is equivalent to using @Configuration, @EnableAutoConfiguration, and @ComponentScan with their default attributes. Spring Boot enables the developer to use a single annotation instead of using multiple. But, as we know, Spring provided loosely coupled features that we can use for each annotation as per our project needs.
What is dependency Injection?
The process of injecting dependent bean objects into target bean objects is called dependency injection.
1) Setter Injection: The IOC container will inject the dependent bean object into the target bean object by calling the setter method.
2) Constructor Injection: The IOC container will inject the dependent bean object into the target bean object by calling the target bean constructor.
3) Field Injection: The IOC container will inject the dependent bean object into the target bean object by Reflection API.
What Are the Basic Annotations that Spring Boot Offers?
The primary annotations that Spring Boot offers reside in its "org.springframework.boot.autoconfigure" and its sub-packages. Here are a couple of basic ones :
@EnableAutoConfiguration – to make Spring Boot look for auto-configuration beans on its classpath and automatically apply them.
@SpringBootApplication – used to denote the main class of a Boot Application. This annotation combines @Configuration, @EnableAutoConfiguration, and @ComponentScan annotations with their default attributes.
What are the credential types supported by Jenkins?
In Jenkins, credentials are a set of information used for authentication with internal/external services to accomplish an action. Jenkins credentials are provisioned & managed by a built-in plugin called - Credentials Binding - plugin. Jenkins can handle different credentials as follows -
1) Secret text - A token such as an API token, JSON token, etc.
2) Username and password - Basic Authentication can be stored as a credential as well.
3) Secret file - A secret file used to authenticate some secure data services & security handshakes.
4) SSH Username with a private key - An SSH public/private key pair for Machine to Machine authentication.
5) Certificate - a PKCS#12 certificate file and an optional password.
6) Docker Host Certificate Authentication credentials.
And as we can guess, this can be extended to several other extensible credential types like - AWS credential, Azure secrets, etc. using commonly available plugins
What are the types of Jenkins pipelines?
1) Jenkins Pipelines can be either - a Declarative pipeline or a Scripted Pipeline.
2) Declarative pipeline makes use of numerous, generic, predefined build steps/stages (i.e. code snippets) to build our job according to our build/automation needs.
3) Whereas, with Scripted pipelines, the steps/stages can be custom-defined & used using a groovy syntax which provides better control & fine-tuned execution levels.
Describe the lifecycle of Docker Container?
The different stages of the docker container from the start of creating it to its end are called the docker container life cycle.The most important stages are :
1) Created: This is the state where the container has just been created new but not started yet.
2) Running: In this state, the container would be running with all its associated processes.
3) Paused: This state happens when the running container has been paused.
4) Stopped: This state happens when the running container has been stopped.
5) Deleted: In this, the container is in a dead state.
How many Docker components are there?
There are three docker components, they are - Docker Client, Docker Host, and Docker Registry.
1) Docker Client: This component performs “build” and “run” operations for the purpose of opening communication with the docker host.
2) Docker Host: This component has the main docker daemon and hosts containers and their associated images. The daemon establishes a connection with the docker registry.
3) Docker Registry: This component stores the docker images. There can be a public registry or a private one. The most famous public registries are Docker Hub and Docker Cloud.
This was a Technical Cum HR round where I was first asked some basic Design Pattern related concepts and then we discussed about my expectations from the company , learnings and growth in the forthcoming years. I would suggest be honest and try to communicate your thoughts properly in these type of rounds to maximise your chances of getting selected.
1) Why should we hire you ?
2) What are your expectations from the company?
3) How was your overall interview experience?
4) What are your strengths and weakness according to you?
5) Where do you see yourself in the next 5 years?
Tip 1 : The cross-questioning can go intense sometimes, think before you speak.
Tip 2 : Be open-minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?