Upload Button Icon Add office photos
Engaged Employer

i

This company page is being actively managed by Ernst & Young Team. If you also belong to the team, you can get access from here

Ernst & Young Verified Tick

Compare button icon Compare button icon Compare

Filter interviews by

Ernst & Young Java Developer Interview Questions and Answers

Updated 23 Aug 2024

19 Interview questions

A Java Developer was asked
Q. How would you connect a Spring Boot project with a database?
Ans. 

Use Spring Data JPA to connect Spring Boot project with database.

  • Add database configuration in application.properties or application.yml file

  • Create entity classes annotated with @Entity and @Table

  • Create repository interfaces extending JpaRepository

  • Use @Autowired annotation to inject repository in services or controllers

A Java Developer was asked
Q. What is the difference between String and StringBuilder?
Ans. 

String is immutable, StringBuilder is mutable.

  • String is a sequence of characters stored in the heap memory.

  • String Builder is a mutable sequence of characters stored in the heap memory.

  • String objects are immutable, meaning their values cannot be changed once created.

  • String Builder objects are mutable, meaning their values can be changed after creation.

  • String concatenation creates a new String object each time, whic...

Java Developer Interview Questions Asked at Other Companies

asked in Deloitte
Q1. Sort 0 and 1 Problem Statement Given an integer array ARR of size ... read more
Q2. Parent class has run() and walk(). Parent run() calls walk(). Chi ... read more
asked in Infosys
Q3. Which should be preferred between String and StringBuffer when th ... read more
Q4. How do you sort a list of students based on their first name?
asked in Cognizant
Q5. What array list and linkedlist difference,how hashmap internally ... read more
A Java Developer was asked
Q. How can we create our own immutable class?
Ans. 

An immutable class in Java can be created by declaring the class as final, making all fields private and final, and not providing any setter methods.

  • Declare the class as final to prevent inheritance

  • Make all fields private and final to prevent modification

  • Do not provide any setter methods to prevent changing the state

  • Initialize all fields in the constructor

  • Avoid returning mutable objects or references to internal m...

🔥 Asked by recruiter 2 times
A Java Developer was asked
Q. Can you explain the working of Microservice Architecture?
Ans. 

Microservice Architecture is an architectural style that structures an application as a collection of loosely coupled services.

  • Each service is self-contained and can be developed, deployed, and scaled independently.

  • Services communicate with each other over a network, typically using HTTP/REST or messaging protocols.

  • Microservices allow for better scalability, flexibility, and resilience compared to monolithic archi...

What people are saying about Ernst & Young

View All
trendylion
Verified Icon
2w
student at
Chandigarh University
Data Science dream job: Need resume advice & referrals!
Hey pros, what should I add to my resume to boost my chances of landing my first Data Science role? Guidance needed! Also, if you're hiring or know openings at: TCS | Infosys | Wipro | Cognizant | Genpact | Accenture | LTIMindtree | Fractal Analytics | Mu Sigma | Quantiphi | Tiger Analytics | EXL | ZS Associates | Deloitte | KPMG | EY | Capgemini | Publicis Sapient, a referral would be amazing! 📎 I’m attaching my resume. Feedback, suggestions, or leads would mean a lot! Thanks for your support! Let’s connect & grow in #DataScience. #DataScience #MachineLearning #DeepLearning #OpenToWork #FresherJobs #DataScienceJobs #Referral #CareerAdvice #ResumeTips #JobSearch #Hiring #AmbitionBox #LinkedInJobs
FeedCard Image
Got a question about Ernst & Young?
Ask anonymously on communities.
🔥 Asked by recruiter 2 times
A Java Developer was asked
Q. What does the @SpringBootApplication annotation do internally?
Ans. 

The @SpringBootApplication annotation is used to mark a class as a Spring Boot application and enables auto-configuration and component scanning.

  • 1. Enables auto-configuration by scanning the classpath for specific types and configuring beans based on their presence.

  • 2. Enables component scanning to automatically discover and register Spring components such as @Component, @Service, @Repository, and @Controller.

  • 3. Co...

A Java Developer was asked
Q. Can you explain the difference between setMaxResults() and setFetchSize() in a Query?
Ans. 

setMaxResults() limits the number of results returned by a query, while setFetchSize() determines the number of rows fetched at a time from the database.

  • setMaxResults() is used to limit the number of results returned by a query.

  • setFetchSize() determines the number of rows fetched at a time from the database.

  • setMaxResults() is typically used for pagination purposes, while setFetchSize() can improve performance by r...

A Java Developer was asked
Q. Explain the use of the final keyword in a variable, method, and class.
Ans. 

The final keyword in Java is used to restrict the modification of variables, methods, and classes.

  • Final variable: Once assigned, the value of a final variable cannot be changed.

  • Final method: A final method cannot be overridden by subclasses.

  • Final class: A final class cannot be extended.

Are these interview questions helpful?
A Java Developer was asked
Q. What are the basic annotations that Spring Boot offers?
Ans. 

Spring Boot offers annotations like @SpringBootApplication, @RestController, @Autowired, @Component, @RequestMapping, etc.

  • @SpringBootApplication - Used to mark the main class of a Spring Boot application.

  • @RestController - Used to define a class as a controller in a RESTful web service.

  • @Autowired - Used for automatic dependency injection.

  • @Component - Used to indicate that a class is a Spring component.

  • @RequestMappi...

🔥 Asked by recruiter 3 times
A Java Developer was asked
Q. Can you explain the @RestController annotation in Spring Boot?
Ans. 

The @RestController annotation in Spring Boot is used to define a class as a RESTful controller.

  • Used to create RESTful web services in Spring Boot

  • Combines @Controller and @ResponseBody annotations

  • Eliminates the need to annotate every method with @ResponseBody

A Java Developer was asked
Q. What are some standard Java pre-defined functional interfaces?
Ans. 

Some standard Java pre-defined functional interfaces include Function, Consumer, Predicate, and Supplier.

  • Function: Represents a function that accepts one argument and produces a result. Example: Function<Integer, String>

  • Consumer: Represents an operation that accepts a single input argument and returns no result. Example: Consumer<String>

  • Predicate: Represents a predicate (boolean-valued function) of one...

Ernst & Young Java Developer Interview Experiences

6 interviews found

Interview experience
4
Good
Difficulty level
Easy
Process Duration
-
Result
-

I applied via Job Portal and was interviewed in Mar 2024. There was 1 interview round.

Round 1 - Technical 

(5 Questions)

  • Q1. They basically asked questions related to your project.
  • Q2. Then asked design patters and related questions to it.
  • Q3. Asked SOLID principal of software development.
  • Ans. 

    SOLID principles are five design principles aimed at making software designs more understandable, flexible, and maintainable.

    • S - Single Responsibility Principle: A class should have one reason to change. Example: A class handling user data should not also handle logging.

    • O - Open/Closed Principle: Software entities should be open for extension but closed for modification. Example: Use interfaces to extend functionality ...

  • Answered by AI
  • Q4. Gave some coding questions related to Java array where I had to return the index of values whos total is 10.
  • Q5. How you would connect springboot project with data base.
  • Ans. 

    Use Spring Data JPA to connect Spring Boot project with database.

    • Add database configuration in application.properties or application.yml file

    • Create entity classes annotated with @Entity and @Table

    • Create repository interfaces extending JpaRepository

    • Use @Autowired annotation to inject repository in services or controllers

  • Answered by AI

Skills evaluated in this interview

Interview experience
4
Good
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(1 Question)

  • Q1. DSA Collection Spring boot Java 8

Java Developer Interview Questions & Answers

user image Rahul Bhardwaj

posted on 31 May 2024

Interview experience
5
Excellent
Difficulty level
-
Process Duration
-
Result
-
Round 1 - Technical 

(1 Question)

  • Q1. 1- REST API 2- MICROSERVICES 3- Java 4- DB

I appeared for an interview before Apr 2021.

Round 1 - Video Call 

(7 Questions)

Round duration - 60 Minutes
Round difficulty - Easy

This round started with some basic questions from Java followed by some questions from OOPS in Java and standard Java 8 questions.

  • Q1. What are the advantages of using Packages in Java?
  • Ans. 

    Packages in Java help organize code, prevent naming conflicts, and provide access control.

    • Organize code into logical groups for easier maintenance and readability

    • Prevent naming conflicts by using unique package names

    • Provide access control by using access modifiers like public, private, protected, and default

    • Facilitate reusability by allowing classes to be easily imported and used in other packages

  • Answered by AI
  • Q2. Why is Java considered platform independent, while the Java Virtual Machine (JVM) is platform dependent?
  • Ans. 

    Java is platform independent because it can run on any system with JVM, which is platform dependent due to its need to interact with the underlying hardware.

    • Java code is compiled into bytecode, which can be executed on any system with a JVM installed.

    • JVM acts as an intermediary between the Java code and the underlying hardware of the system.

    • JVM is platform dependent because it needs to interact with the specific hardwa...

  • Answered by AI
  • Q3. Explain the use of the final keyword in a variable, method, and class.
  • Ans. 

    The final keyword in Java is used to restrict the modification of variables, methods, and classes.

    • Final variable: Once assigned, the value of a final variable cannot be changed.

    • Final method: A final method cannot be overridden by subclasses.

    • Final class: A final class cannot be extended.

  • Answered by AI
  • Q4. What is meant by an interface in Object-Oriented Programming?
  • Ans. 

    An interface in OOP is a blueprint of a class that defines a set of methods without implementation.

    • Interfaces in Java are used to achieve abstraction and multiple inheritance.

    • All methods in an interface are abstract by default and do not have a body.

    • Classes can implement multiple interfaces but can only extend one class.

    • Example: interface Shape { void draw(); }

    • Example: class Circle implements Shape { public void draw()...

  • Answered by AI
  • Q5. What is the difference between an abstract class and an interface in OOP?
  • Ans. 

    Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.

    • Abstract class can have constructors, fields, and methods, while interface can only have constants and method signatures.

    • A class can extend only one abstract class, but can implement multiple interfaces.

    • Abstract classes are used to define common characteristics of subclasses, while interfaces are used to defin...

  • Answered by AI
  • Q6. What are some standard Java pre-defined functional interfaces?
  • Ans. 

    Some standard Java pre-defined functional interfaces include Function, Consumer, Predicate, and Supplier.

    • Function: Represents a function that accepts one argument and produces a result. Example: Function<Integer, String>

    • Consumer: Represents an operation that accepts a single input argument and returns no result. Example: Consumer<String>

    • Predicate: Represents a predicate (boolean-valued function) of one argu...

  • Answered by AI
  • Q7. What are the features of a lambda expression?
  • Ans. 

    Lambda expressions are a feature introduced in Java 8 to provide a concise way to represent anonymous functions.

    • Lambda expressions are used to provide implementation of a functional interface.

    • They enable you to treat functionality as a method argument, or code as data.

    • Syntax of lambda expressions is (argument) -> (body).

    • Example: (int a, int b) -> a + b

  • Answered by AI
Round 2 - Video Call 

(9 Questions)

Round duration - 60 Minutes
Round difficulty - Medium

This round had questions from Microservices , Spring Boot and Hibernate. The interviewer was quite freindly and also helped wherever I was stuck.

  • Q1. What are the basic annotations that Spring Boot offers?
  • Ans. 

    Spring Boot offers annotations like @SpringBootApplication, @RestController, @Autowired, @Component, @RequestMapping, etc.

    • @SpringBootApplication - Used to mark the main class of a Spring Boot application.

    • @RestController - Used to define a class as a controller in a RESTful web service.

    • @Autowired - Used for automatic dependency injection.

    • @Component - Used to indicate that a class is a Spring component.

    • @RequestMapping - ...

  • Answered by AI
  • Q2. Can you explain the @RestController annotation in Spring Boot?
  • Ans. 

    The @RestController annotation in Spring Boot is used to define a class as a RESTful controller.

    • Used to create RESTful web services in Spring Boot

    • Combines @Controller and @ResponseBody annotations

    • Eliminates the need to annotate every method with @ResponseBody

  • Answered by AI
  • Q3. What is dependency injection?
  • Ans. 

    Dependency injection is a design pattern in which the dependencies of an object are provided externally rather than created within the object itself.

    • In dependency injection, the dependencies of a class are injected into the class from an external source, rather than the class creating the dependencies itself.

    • This helps in achieving loose coupling between classes, making the code more maintainable and testable.

    • There are...

  • Answered by AI
  • Q4. What does the @SpringBootApplication annotation do internally?
  • Ans. 

    The @SpringBootApplication annotation is used to mark a class as a Spring Boot application and enables auto-configuration and component scanning.

    • 1. Enables auto-configuration by scanning the classpath for specific types and configuring beans based on their presence.

    • 2. Enables component scanning to automatically discover and register Spring components such as @Component, @Service, @Repository, and @Controller.

    • 3. Combine...

  • Answered by AI
  • Q5. Can you explain the difference between setMaxResults() and setFetchSize() in a Query?
  • Ans. 

    setMaxResults() limits the number of results returned by a query, while setFetchSize() determines the number of rows fetched at a time from the database.

    • setMaxResults() is used to limit the number of results returned by a query.

    • setFetchSize() determines the number of rows fetched at a time from the database.

    • setMaxResults() is typically used for pagination purposes, while setFetchSize() can improve performance by reduci...

  • Answered by AI
  • Q6. What are the concurrency strategies available in Hibernate?
  • Ans. 

    Hibernate provides several concurrency strategies like optimistic locking, pessimistic locking, and versioning.

    • Optimistic locking: Allows multiple transactions to read and write to the database without locking the data. It checks for concurrent modifications before committing the transaction.

    • Pessimistic locking: Locks the data to prevent other transactions from accessing or modifying it until the lock is released.

    • Versi...

  • Answered by AI
  • Q7. Can you explain the N+1 SELECT problem in Hibernate?
  • Ans. 

    N+1 SELECT problem in Hibernate occurs when a query results in N+1 additional queries being executed.

    • Occurs when a query fetches a collection of entities and then for each entity, an additional query is executed to fetch related entities

    • Can be resolved by using fetch joins or batch fetching to fetch all related entities in a single query

    • Example: Fetching a list of orders and then for each order, fetching the customer i...

  • Answered by AI
  • Q8. Can you explain the working of Microservice Architecture?
  • Ans. 

    Microservice Architecture is an architectural style that structures an application as a collection of loosely coupled services.

    • Each service is self-contained and can be developed, deployed, and scaled independently.

    • Services communicate with each other over a network, typically using HTTP/REST or messaging protocols.

    • Microservices allow for better scalability, flexibility, and resilience compared to monolithic architectu...

  • Answered by AI
  • Q9. What issues are generally addressed by Spring Cloud?
  • Ans. 

    Spring Cloud addresses issues related to distributed systems and microservices architecture.

    • Service discovery and registration

    • Load balancing

    • Circuit breakers

    • Distributed configuration management

    • Routing and gateway

    • Monitoring and tracing

  • Answered by AI
Round 3 - HR 

Round duration - 30 Minutes
Round difficulty - Easy

This was a Technical Cum HR round where I was first asked some basic Java related concepts and then we discussed
about my expectations from the company , learnings and growth in the forthcomig 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.

Interview Preparation Tips

Eligibility criteria1+ years of experienceErnst & Young (EY) interview preparation:Topics to prepare for the interview - Java , OOPS , Spring , MVC , Hibernate , AptitudeTime required to prepare for the interview - 3 MonthsInterview preparation tips for other job seekers

Tip 1 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 2 : Do at-least 2 good projects and you must know every bit of them.

Application resume tips for other job seekers

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.

Final outcome of the interviewSelected

Skills evaluated in this interview

I applied via Naukri.com and was interviewed in Sep 2020. There was 1 interview round.

Interview Questionnaire 

4 Questions

  • Q1. -OOPS concepts.
  • Q2. Difference between checked and unchecked exceptions.
  • Q3. Difference between String and String Builder
  • Q4. How can we create our own immutable class

Interview Preparation Tips

Interview preparation tips for other job seekers - Be prepared with the concepts as some questions were commonly asked and easy to be answered while some were not so common. Questions weren't that though although, but was not easy to recall the concepts during the interview.

Skills evaluated in this interview

I applied via Recruitment Consultant and was interviewed in Feb 2021. There was 1 interview round.

Interview Questionnaire 

1 Question

  • Q1. The basic question of core java.Algorithms with java 8.Spring and spring-boot.Normal question of DB. Find 3rd largest salary?

Interview Preparation Tips

Interview preparation tips for other job seekers - Be well versed with core java, Practice algorithims.Java 8 is essential. Be comfortable with spring-boot annotations.

Interview questions from similar companies

Interview Questionnaire 

2 Questions

  • Q1. Three round. Each had one market sizing case study.
  • Q2. Layout of your approach is most important. Clearly communicating thoughts, making the interview interactive are key points for any management consulting interview. You dont need an absolute answer. What ma...
Are these interview questions helpful?

I applied via Naukri.com and was interviewed before Feb 2021. There were 2 interview rounds.

Round 1 - HR 

(4 Questions)

  • Q1. Why are you looking for a change?
  • Q2. Tell me about yourself.
  • Q3. What are your salary expectations?
  • Q4. Share details of your previous job.
Round 2 - Technical 

(1 Question)

  • Q1. Sox related questions

Interview Preparation Tips

Topics to prepare for PwC Associate interview:
  • SOX Compliance
  • R2R
Interview preparation tips for other job seekers - Be confident. Always greet them first. It shows your confidence. If you don’t know any answer it’s fine. But do show them that you are keen to learn on that topic more.

Associate Interview Questions & Answers

PwC user image Anonymous

posted on 30 Nov 2021

Interview Questionnaire 

1 Question

  • Q1. Ind as,Auditing Standards.?

Interview Preparation Tips

Interview preparation tips for other job seekers - Be Confident what ever they ask
Interview experience
3
Average
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Selected Selected

I applied via Referral and was interviewed before Dec 2021. There were 4 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Technical 

(1 Question)

  • Q1. Questions relating to AS
Round 3 - Technical 

(1 Question)

  • Q1. AS questions were asked
Round 4 - HR 

(1 Question)

  • Q1. General discussion only

Interview Preparation Tips

Interview preparation tips for other job seekers - Prepare well on AS and latest amendments.
There are 2 technical rounds. Manager and partner

Ernst & Young Interview FAQs

How many rounds are there in Ernst & Young Java Developer interview?
Ernst & Young interview process usually has 1 rounds. The most common rounds in the Ernst & Young interview process are Technical.
How to prepare for Ernst & Young Java Developer interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Ernst & Young. The most common topics and skills that interviewers at Ernst & Young expect are Java, Microservices, Spring Boot, Hibernate and J2Ee.
What are the top questions asked in Ernst & Young Java Developer interview?

Some of the top questions asked at the Ernst & Young Java Developer interview -

  1. How can we create our own immutable cl...read more
  2. Difference between checked and unchecked exceptio...read more
  3. How you would connect springboot project with data ba...read more

Tell us how to improve this page.

Overall Interview Experience Rating

4.3/5

based on 3 interview experiences

Difficulty level

Easy 100%
View more

Interview Questions from Similar Companies

Deloitte Interview Questions
3.7
 • 3k Interviews
PwC Interview Questions
3.3
 • 1.4k Interviews
KPMG India Interview Questions
3.4
 • 844 Interviews
ZS Interview Questions
3.3
 • 475 Interviews
BCG Interview Questions
3.7
 • 203 Interviews
Bain & Company Interview Questions
3.9
 • 111 Interviews
WSP Interview Questions
4.2
 • 99 Interviews
Mercer Interview Questions
3.7
 • 89 Interviews
View all
Ernst & Young Java Developer Salary
based on 77 salaries
₹8.4 L/yr - ₹16.4 L/yr
90% more than the average Java Developer Salary in India
View more details

Ernst & Young Java Developer Reviews and Ratings

based on 4 reviews

4.0/5

Rating in categories

3.9

Skill development

3.5

Work-life balance

3.2

Salary

4.3

Job security

4.3

Company culture

2.8

Promotions

2.9

Work satisfaction

Explore 4 Reviews and Ratings
Senior Consultant
19.3k salaries
unlock blur

₹15 L/yr - ₹27 L/yr

Consultant
13.1k salaries
unlock blur

₹10 L/yr - ₹18 L/yr

Manager
8k salaries
unlock blur

₹23 L/yr - ₹40 L/yr

Assistant Manager
6.8k salaries
unlock blur

₹14.3 L/yr - ₹25.5 L/yr

Associate Consultant
4.3k salaries
unlock blur

₹5.2 L/yr - ₹12 L/yr

Explore more salaries
Compare Ernst & Young with

Deloitte

3.7
Compare

PwC

3.3
Compare

EY Global Delivery Services ( EY GDS)

3.5
Compare

Accenture

3.8
Compare
write
Share an Interview