Tip 1 : Prepare Basics
Tip 2 : Explain your project very well in your resume
Tip 3 : Prepare by building projects
Tip 1 : Explain your past projects very well
Tip 2 : Mention the tech stack you worked on ,and add the certifications
1 coding question ,and Mcqs on spring ,hibernate ,sql and java questions



Remove Duplicates from Sorted Array
// simple java program to remove duplicates
class Main {
// Function to remove duplicate elements This function
// returns new size of modified array.
static int removeDuplicates(int arr[], int n)
{
// Return, if array is empty or contains a single
// element
if (n == 0 || n == 1)
return n;
int[] temp = new int[n];
// Start traversing elements
int j = 0;
for (int i = 0; i < n - 1; i++)
// If current element is not equal to next
// element then store that current element
if (arr[i] != arr[i + 1])
temp[j++] = arr[i];
// Store the last element as whether it is unique or
// repeated, it hasn't stored previously
temp[j++] = arr[n - 1];
// Modify original array
for (int i = 0; i < j; i++)
arr[i] = temp[i];
return j;
}
public static void main(String[] args)
{
int arr[] = { 1, 2, 2, 3, 4, 4, 4, 5, 5 };
int n = arr.length;
n = removeDuplicates(arr, n);
// Print updated array
for (int i = 0; i < n; i++)
System.out.print(arr[i] + " ");
}
}
// This code is contributed by Aditya Kumar (adityakumar129)
Which of the following method can be used to used to instantiate a method?
a) static factory method
b) default-init method
c) destroy method
d) lazy-init method
Answer- static factory method
Explanation: Class attribute is used to specify the name of the class that contains the static factory method.
In afternoon ,Environment was good , Interviewer was good
What is a Spring configuration file?
A Spring configuration file is an XML file. This file mainly contains the classes information. It describes how those classes are configured as well as introduced to each other. The XML configuration files, however, are verbose and more clean. If it’s not planned and written correctly, it becomes very difficult to manage in big projects.
What do you mean by Dependency Injection?
In Dependency Injection, you do not have to create your objects but have to describe how they should be created. You don’t connect your components and services together in the code directly, but describe which services are needed by which components in the configuration file. The IoC container will wire them up together.
How configuration metadata is provided to the Spring container?
Configuration metadata can be provided to Spring container in following ways:
XML-Based configuration: In Spring Framework, the dependencies and the services needed by beans are specified in configuration files which are in XML format. These configuration files usually contain a lot of bean definitions and application specific configuration options. They generally start with a bean tag.
Annotation-Based configuration: Instead of using XML to describe a bean wiring, you can configure the bean into the component class itself by using annotations on the relevant class, method, or field declaration. By default, annotation wiring is not turned on in the Spring container. So, you need to enable it in your Spring configuration file before using it.
Java-based configuration: The key features in Spring Framework’s new Java-configuration support are @Configuration annotated classes and @Bean annotated methods.
What are the uses of @RequestMapping and @RestController annotations in Spring Boot?
@RequestMapping:
This provides the routing information and informs Spring that any HTTP request matching the URL must be mapped to the respective method.
org.springframework.web.bind.annotation.RequestMapping has to be imported to use this annotation.
@RestController:
This is applied to a class to mark it as a request handler thereby creating RESTful web services using Spring MVC. This annotation adds the @ResponseBody and @Controller annotation to the class.
org.springframework.web.bind.annotation.RestController has to be imported to use this annotation.
What is the use of @Autowired annotation? Explain with code
@Autowired annotation is meant for the injection of a bean by means of its type along with methods and fields. This helps the Spring framework to resolve dependencies by injecting and collaborating the beans into another bean. For example, consider the below code snippet
import org.Springframework.beans.factory.annotation.Autowired;
import java.util.*;
public class InterviewBit {
// Autowiring/Injecting FormatterUtil as dependency to InterviewBit class
@Autowired
private FormatterUtil formatterUtil;
public Date something( String value ){
Date dateFormatted = formatterUtil.formatDate(value);
return dateFormatted
}
}
/**
* Util class to format any string value to valid date format
*/
public class FormatterUtil {
public Date formatDate(String value){
//code to format date
}
}
How is it possible to use the Tomcat JNDI DataSource in the Spring applications?
To use the servlet container which is configured in the JNDI (Java Naming and Directory Interface) DataSource, the DataSource bean has to be configured in the spring bean config file and then injected into the beans as dependencies. Post this, the DataSource bean can be used for performing database operations by means of the JdbcTemplate. The syntax for registering a MySQL DataSource bean:
What do you understand by Content delivery network?
Content delivery network or in short CDN is a globally distributed proxy server network that serves content from locations close by to the end-users. Usually, in websites, static files like HTML, CSS, JS files, images and videos are served from CDN.
Using CDN in delivering content helps to improve performance:
Load on the servers is reduced significantly as some of the responsibility is shared by CDNs.
There are two types of CDNs, they are:
Push CDNs: Here, the content is received by the CDNs whenever changes occur on the server. The responsibility lies in us for uploading the content to CDNs. Content gets updated to the CDN only when it is modified or added which in turn maximises storage by minimising the traffic. Generally, sites with lesser traffic or content work well using push CDNs.
Pull CDNs: Here new content is grabbed from the server when the first user requests the content from the site. This leads to slower requests for the first time till the content gets stored/cached on the CDN. These CDNs minimizes space utilized on CDN but can lead to redundant traffic when expired files are pulled before they are changed. Websites having heavy traffic work well when used with pull CDNs.
How do you design a recommendation system?
Recommendation systems are used for helping users identify what they want efficiently by assisting them by offering various choices and alternatives based on their history or interests.
What are some of the Required Features?
Discuss what kind of recommendation system is required - whether it is for movies, e-commerce websites, songs etc.
What are some of the common problems encountered?
Figure out how to recommend fresh and relevant content in real-time.
Possible tips for consideration:
Discuss how to use the Eval component for understanding the working of the system.
Discuss how to train a collaborative filtering approach.
In evening , teams , good
my past experience,
some behavioral questions
how with you deal if your manager is not supportive
some package CTC negotiation
willing to relocate in case of project requirement
just be confident, answer point to point, communication skills should be good

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: