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 3 : Do at-least 2 good projects and you must know every bit of them.
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.
This round was majorly focused towards some core concepts in Java and OOPS.
What are the various access specifiers in Java?
In Java, access specifiers are the keywords which are used to define the access scope of the method, class, or a variable. In Java, there are four access specifiers given below.
1) Public : The classes, methods, or variables which are defined as public, can be accessed by any class or method.
2) Protected : Protected can be accessed by the class of the same package, or by the sub-class of this class, or within the same class.
3) Default : Default are accessible within the package only. By default, all the classes, methods, and variables are of default scope.
4) Private : The private class, methods, or variables defined as private can be accessed within the class only.
What do you know about JIT compiler?
1) JIT stands for Just-In-Time and it is used for improving the performance during run time. It does the task of compiling parts of byte code having similar functionality at the same time thereby reducing the amount of compilation time for the code to run.
2) The compiler is nothing but a translator of source code to machine-executable code.
Working of JIT Compiler :
1) First, the Java source code (.java) conversion to byte code (.class) occurs with the help of the javac compiler.
2) Then, the .class files are loaded at run time by JVM and with the help of an interpreter, these are converted to machine understandable code.
3) JIT compiler is a part of JVM. When the JIT compiler is enabled, the JVM analyzes the method calls in the .class files and compiles them to get more efficient and native code. It also ensures that the prioritized method calls are optimized.
4) Once the above step is done, the JVM executes the optimized code directly instead of interpreting the code again. This increases the performance and speed of the execution.
Explain the use of final keyword in variable, method and class.
In Java, the final keyword is used as defining something as constant /final and represents the non-access modifier.
final variable:
1) When a variable is declared as final in Java, the value can’t be modified once it has been assigned.
2) If any value has not been assigned to that variable, then it can be assigned only by the constructor of the class.
final method:
1) A method declared as final cannot be overridden by its children's classes.
2) A constructor cannot be marked as final because whenever a class is inherited, the constructors are not inherited. Hence, marking it final doesn't make sense. Java throws compilation error saying - modifier final not allowed here
final class:
1) No classes can be inherited from the class declared as final. But that final class can extend other classes for its usage.
How many types of memory areas are allocated by JVM?
1) Class(Method) Area : Class Area stores per-class structures such as the runtime constant pool, field, method data, and the code for methods.
2) Heap : It is the runtime data area in which the memory is allocated to the objects
3) Stack : Java Stack stores frames. It holds local variables and partial results, and plays a part in method invocation and return. Each thread has a private JVM stack, created at the same time as the thread. A new frame is created each time a method is invoked. A frame is destroyed when its method invocation completes.
4) Program Counter Register : PC (program counter) register contains the address of the Java virtual machine instruction currently being executed.
5) Native Method Stack : It contains all the native methods used in the application.
What is the difference between JDK, JRE, and JVM?
JVM :
JVM is an acronym for Java Virtual Machine; it is an abstract machine which provides the runtime environment in which Java bytecode can be executed. It is a specification which specifies the working of Java Virtual Machine. Its implementation has been provided by Oracle and other companies. Its implementation is known as JRE.
JVMs are available for many hardware and software platforms (so JVM is platform dependent). It is a runtime instance which is created when we run the Java class. There are three notions of the JVM: specification, implementation, and instance.
JRE :
JRE stands for Java Runtime Environment. It is the implementation of JVM. The Java Runtime Environment is a set of software tools which are used for developing Java applications. It is used to provide the runtime environment. It is the implementation of JVM. It physically exists. It contains a set of libraries + other files that JVM uses at runtime.
JDK :
JDK is an acronym for Java Development Kit. It is a software development environment which is used to develop Java applications and applets. It physically exists. It contains JRE + development tools. JDK is an implementation of any one of the below given Java Platforms released by Oracle Corporation:
1) Standard Edition Java Platform
2) Enterprise Edition Java Platform
3) Micro Edition Java Platform
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 do you mean by data encapsulation?
1) Data Encapsulation is an Object-Oriented Programming concept of hiding the data attributes and their behaviors in
a single unit.
2) It helps developers to follow modularity while developing software by ensuring that each object is independent of
other objects by having its own methods, attributes, and functionalities.
3) It is used for the security of the private properties of an object and hence serves the purpose of data hiding.
This round started with some basic questions from Spring Boot and then the interviewer switched to SQL and asked me to execute some questions on SQL followed by some more questions from OOPS and Java Design Pattern.



If a string has 'x' repeated 5 times, replace this "xxxxx" with "x5".
The string is compressed only when the repeated character count is more than 1.
The consecutive count of every character in the input string is less than or equal to 9.
This was nothing but the Run Length Encoding Algorithm which I was familiar with. So I coded it preety fast.
Algorithm :
1) Pick the first character from the source string.
2) Append the picked character to the destination string.
3) Count the number of subsequent occurrences of the picked character and append the count to the destination
string.
4) Pick the next character and repeat steps (2),(3) and (4) if the end of the string is NOT reached.
TC : O(N), where N=length of the string
SC : O(1)
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 is the purpose of using @ComponentScan in the class files?
Spring Boot application scans all the beans and package declarations when the application initializes. You need to
add the @ComponentScan annotation for your class file to scan your components added to your project.
Write a query that joins two tables A and B having common attribute ID and selects records(ID_NAME) that have
matching ID values in both tables .
SELECT A.ID_Name, B.ID_Name
FROM A
INNER JOIN B ON A.ID=B.ID;
Given an Employee Table, find the Nth highest salary from it.
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
BEGIN
DECLARE M INT;
SET M=N-1;
RETURN (
SELECT DISTINCT Salary FROM Employee ORDER BY Salary DESC LIMIT M, 1
);
END
What are the types of design patterns in Java?
There are three types of design patterns. They are:
1) Creational Patterns: These patterns provide freedom of choice between creating objects by hiding the logic. The objects constructed are decoupled from the implemented system. Some of the examples of creational patterns are - Factory design pattern, Builder design, Prototype design, Singleton design, Abstract Factory design.
2) Structural Patterns: These patterns help in defining how the structures of classes and objects should be like for defining the composition between classes, interfaces and objects. Some of the examples of structural patterns are - Adaptor design, Facade design, Decorator design, proxy design etc.
3) Behavioural Patterns: These patterns help to define how the objects should communicate and interact with one another. Some of the examples of behavioural patterns are - Command pattern, Iterator pattern, Observer pattern, Strategy pattern, etc.
This is a cultural fitment testing round. HR was very frank and asked standard questions. Then we discussed about my
role.
Tell me something not there in your resume.
If you get this question, it's an opportunity to choose the most compelling information to share that is not obvious from
your resume.
Example :
Strength -> I believe that my greatest strength is the ability to solve problems quickly and efficiently, which makes me
unique from others.
Ability to handle Pressure -> I enjoy working under pressure because I believe it helps me grow and become more
efficient.
Tip : Emphasize why you were inspired to apply for the job. You can also explain that you are willing to invest a great
deal of energy if hired.
These are generally very open ended questions and are asked to test how quick wit a candidate is. So there is
nothing to worry about if you have a good command over your communication skills and you are able to propagate
your thoughts well to the interviewer.
Why should we hire you ?
Tip 1 : The cross questioning can go intense some time, 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.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical
questions. No coding in most of the cases but some discussions over the design can surely happen.

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