i
Ernst & Young
Filter interviews by
I applied via Naukri.com and was interviewed in Sep 2020. There was 1 interview round.
Checked exceptions are checked at compile-time while unchecked exceptions are not.
Checked exceptions are checked at compile-time and must be handled or declared in the method signature.
Unchecked exceptions are not checked at compile-time and do not need to be handled or declared.
Checked exceptions are usually used for recoverable errors while unchecked exceptions are used for unrecoverable errors.
Examples of checked ex...
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, which can...
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 mutabl
I applied via Job Portal and was interviewed in Mar 2024. There was 1 interview round.
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
What people are saying about Ernst & Young
Ernst & Young interview questions for designations
I was interviewed before Apr 2021.
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.
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 system have different JVMs.
Which among String or String Buffer should be preferred when there are lot of updates required to be done in the
data?
StringBuffer is mutable and dynamic in nature whereas String is immutable. Every updation / modification of String
creates a new String thereby overloading the string pool with unnecessary objects. Hence, in the cases of a lot of
updates, it is always preferred to use StringBuffer as it will reduce the overhead of the creation of multiple String
objects in the string pool.
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 ...
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.
1) final variable :
i) When a variable is declared as final in Java, the value can’t be modified once it has been assigned.
ii) If any value has not been assigned to that variable, then it can be assigned only by the constructor of the class.
2) final method :
i) A method declared as final cannot be overridden...
What is meant by Interface?
Multiple inheritances cannot be achieved in java. To overcome this problem the Interface concept is
introduced. An interface is a template which has only method declarations and not the method implementation.
Some imp. points about Interface :
1) All the methods in the interface are internally public abstract void.
2) All the variables in the interface are internally public static final that is constants.
3) Classes can imp...
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 ...
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 ...
What are the features of a lambda expression?
Below are the two significant features of the methods that are defined as the lambda expressions:
1) Lambda expressions can be passed as a parameter to another method.
2) Lambda expressions can be standalone without belonging to any class.
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.
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, @EnableAutoCon...
Explain @RestController annotation in Sprint boot?
It is a combination of @Controller and @ResponseBody, used for creating a restful controller. It converts the
response to JSON or XML. It ensures that data returned by each method will be written straight into the response
body instead of returning a template.
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...
What is the @Controller annotation used for? How can you create a controller without an annotation?
The @Controller is a Spring MVC annotation to define Controller but in reality, it's just a stereotype annotation. You
can even create a controller without @Controller by annotating the Spring MVC Controller classes using
@Component annotation. The real job of request mapping to the handler method is done using @RequestMapping
annotation.
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.
Can you tell the difference between setMaxResults() and setFetchSize() of Query?
setMaxResults() the function works similar to LIMIT in SQL. Here, we set the maximum number of rows that we want
to be returned. This method is implemented by all database drivers.
setFetchSize() works for optimizing how Hibernate sends the result to the caller for example: are the results buffered,
are they sent in different size chunks, etc. This method is not implemented by all the database drivers.
What are the concurrency strategies available in hibernate?
Concurrency strategies are the mediators responsible for storing and retrieving items from the cache. While enabling
second-level cache, it is the responsibility of the developer to provide what strategy is to be implemented to decide for
each persistent class and collection.
Following are the concurrency strategies that are used :
1) Transactional: This is used in cases of updating data that most likely causes stale...
Can you tell something about the N+1 SELECT problem in Hibernate?
N+1 SELECT problem is due to the result of using lazy loading and on-demand fetching strategy.
Let's take an example.
If you have an N items list and each item from the list has a dependency on a collection of another object,
say bid. In order to find the highest bid for each item while using the lazy loading strategy, hibernate has to first fire 1
query to load all items and then subsequently fire N queries to...
Explain the working of Microservice Architecture.
Microservice architectures consist of the following components :
1) Clients: Different users send requests from various devices.
2) Identity Provider: Validate a user's or client's identity and issue security tokens.
3) API Gateway: Handles the requests from clients.
4) Static Content: Contains all of the system's content.
5) Management: Services are balanced on nodes and failures are identified.
6) Service Discovery: A guid...
What issues are generally solved by spring clouds?
The following problems can be solved with spring cloud :
1) Complicated issues caused by distributed systems: This includes network issues, latency problems, bandwidth
problems, and security issues.
2) Service Discovery issues: Service discovery allows processes and services to communicate and locate each other
within a cluster.
3) Redundancy issues: Distributed systems can often have redundancy issues.
4) Load balancing iss...
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.
Why should we hire you ?
What are your expectations from the company?
How was your overall interview experience?
What are your strengths and weakness according to you?
Where do you see yourse...
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
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.
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.
Get interview-ready with Top Ernst & Young Interview Questions
I applied via Recruitment Consultant and was interviewed in Feb 2021. There was 1 interview round.
I applied via Naukri.com and was interviewed in Jan 2024. There were 2 interview rounds.
The questions are related to Java programming and do not involve the medical field or puzzles.
The static keyword is used to declare a variable or method that belongs to the class itself, rather than an instance of the class.
The final keyword is used to declare a constant value or to prevent a variable, method, or class from being modified or extended.
Different ways of creating threads in Java include extending the Thre...
API gateway serves as a central entry point for all client requests, providing various functionalities beyond authentication.
API gateway acts as a reverse proxy, routing requests to appropriate microservices.
It can handle request/response transformation, protocol translation, and payload encryption/decryption.
API gateway can implement rate limiting, throttling, and caching to improve performance.
It enables service disc...
I applied via Company Website and was interviewed in Sep 2023. There were 2 interview rounds.
HashMap is a data structure in Java that stores key-value pairs and allows fast retrieval of values based on keys.
HashMap implements the Map interface in Java
It allows null keys and values
Keys in a HashMap must be unique
Example: HashMap
HashMap is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values.
HashMap internally uses an array of linked lists to store key-value pairs.
When a key-value pair is added, the key is hashed to determine the index in the array where it will be stored.
If multiple keys hash to the same index, a linked list is used to handle collisions.
HashMap uses the hashCode() method of keys to calc...
Throw is used to explicitly throw an exception in a method, while Throws is used to declare the exceptions that a method may throw.
Throw is used within a method to throw an exception explicitly.
Throws is used in the method signature to declare the exceptions that the method may throw.
Throw is followed by an instance of Throwable class, while Throws is followed by the exception class names separated by commas.
Example: t...
Arrays are fixed in size, while ArrayLists can dynamically resize. ArrayLists provide more flexibility and functionality.
Arrays have a fixed size, while ArrayLists can dynamically resize.
ArrayLists can easily add, remove, or modify elements, while arrays require manual shifting of elements.
Arrays use [] syntax for declaration and initialization, while ArrayLists use the ArrayList class from the Java Collections framewo
ArrayList is resizable array implementation, LinkedList is doubly linked list implementation, Vector is synchronized version of ArrayList.
ArrayList is faster for accessing elements, LinkedList is faster for adding/removing elements in middle.
ArrayList uses less memory than LinkedList due to contiguous memory allocation.
Vector is thread-safe but slower than ArrayList due to synchronization overhead.
Iterate through a hashmap using an iterator in Java
Create an iterator using the entrySet() method of the hashmap
Use a while loop to iterate through the hashmap entries
Access the key and value of each entry using the getKey() and getValue() methods
Sort list of employees by employee number using streams and comparator.
Use Stream API to convert list to stream
Use Comparator to compare employee numbers
Use sorted() method to sort the stream based on comparator
I applied via Job Portal and was interviewed before Mar 2023. There were 3 interview rounds.
Aptitude test with Java MCQ questions
Basic programs in Java
1 Interview rounds
based on 3 reviews
Rating in categories
Senior Consultant
15.4k
salaries
| ₹9.2 L/yr - ₹29.5 L/yr |
Consultant
11.8k
salaries
| ₹5.4 L/yr - ₹19 L/yr |
Manager
7.4k
salaries
| ₹16.5 L/yr - ₹52 L/yr |
Assistant Manager
6.3k
salaries
| ₹9.3 L/yr - ₹29.9 L/yr |
Associate Consultant
3.8k
salaries
| ₹3.5 L/yr - ₹12 L/yr |
Deloitte
PwC
EY Global Delivery Services ( EY GDS)
Accenture