i
TCS
Filter interviews by
I was interviewed in Jul 2024.
Idempotent term in patch and put means that multiple identical requests have the same effect as a single request.
Idempotent means that the result of a successful request is the same regardless of how many times it is repeated.
In PATCH and PUT requests, idempotent means that sending the same request multiple times will not have any additional side effects.
For example, if a PATCH request updates a resource with specific ...
Java memory types and where objects are stored
Java memory consists of stack and heap
Primitive data types are stored in stack
Objects and arrays are stored in heap
References to objects are stored in stack
Example: int num = 5; // num is stored in stack, value 5 is stored in stack
Example: String str = new String(); // str reference is stored in stack, actual String object is stored in heap
Yes, hash map stores unique keys.
Hash map in Java does not allow duplicate keys. If you try to insert a duplicate key, it will replace the existing value with the new one.
However, hash map allows duplicate values.
Example: HashMap
Java 8 introduced new methods for HashMap such as forEach, compute, merge, etc.
Java 8 introduced new methods like forEach, compute, merge for HashMap operations
Java 8 allows using lambda expressions for iterating over HashMap entries
Java 8 introduced default methods in Map interface for HashMap
No, static methods or variables cannot be created inside static main() method.
Static methods or variables cannot be created inside another static method.
Static methods or variables can only be created at the class level, outside of any method.
Example: public class MyClass { static int myVariable = 10; }
I applied via Company Website and was interviewed before Mar 2022. There were 3 interview rounds.
Basic aptitude question, you can follow Study Smart Youtube channel. Some question you will get same
Profile in Spring Boot is a set of configurations that can be used to customize the behavior of an application.
Profiles allow developers to define different configurations for different environments (e.g. development, testing, production).
Profiles can be activated using the 'spring.profiles.active' property in the application.properties file.
Profiles can be used to specify different database connections, logging levels...
Custom exceptions can be created by extending the Exception class in Java.
Create a new class that extends the Exception class
Override the constructors to provide custom messages and error codes
Throw the custom exception using the 'throw' keyword
StreamsAPI is a feature in Java that allows for processing sequences of elements in a functional style.
StreamsAPI provides a way to work with collections of objects in a more concise and declarative manner.
It supports operations like filter, map, reduce, and collect.
Example: List
An exception in Java is an event that disrupts the normal flow of a program's instructions.
Exceptions are objects that are thrown when an abnormal condition occurs during the execution of a program.
They can be caught and handled using try-catch blocks.
Unchecked exceptions do not need to be declared in a method's throws clause, while checked exceptions do.
Examples of exceptions in Java include NullPointerException, Arra
I applied via Approached by Company and was interviewed in Dec 2024. There was 1 interview round.
Java 8 introduced static and default methods in interfaces, allowing for method implementation and code reusability.
Java 8 introduced static methods in interfaces, allowing for method implementation directly in the interface itself.
Default methods were also introduced in Java 8, enabling interfaces to have method implementations without affecting implementing classes.
Static methods in interfaces can be called using the...
HashMap is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values.
HashMap 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.
To synchronize a HashMap, you can use the synchronizedMap() m...
No, the program will not compile if the parent class throws a runtime exception while the child class throws an arithmetic exception.
In Java, if a parent class method throws a checked exception, the child class method can only throw the same exception or its subclasses.
ArithmeticException is an unchecked exception, so if the parent class throws a checked exception and the child class throws an unchecked exception, the ...
Configure JDBC in Spring Boot to specify which database to use
Define multiple DataSource beans in the configuration class
Use @Primary annotation to specify the primary DataSource
Use @Qualifier annotation to specify the secondary DataSource
Inject the DataSource beans where needed in the application
To use a Jetty server in a Spring Boot application, you can configure it as a dependency and customize its settings.
Add Jetty server dependency in your pom.xml file
Exclude Tomcat server dependency if it's included by default in Spring Boot
Configure Jetty server settings in application.properties or application.yml file
Example: Add Jetty dependency - <dependency> <groupId>org.springframework.boot</groupId...
RequestParam is used to extract query parameters from the URL, while PathVariable is used to extract values from the URI path.
RequestParam is used for query parameters in the URL, while PathVariable is used for values in the URI path.
RequestParam is optional, while PathVariable is required.
RequestParam is used with the @RequestParam annotation, while PathVariable is used with the @PathVariable annotation.
Example: @Requ...
I would implement timeout mechanisms and retries to handle the scenario of one microservice awaiting a response from another microservice taking an extended time.
Implement timeout mechanisms in the calling microservice to limit the waiting time for a response.
Set up retry logic to automatically resend the request to the slow microservice if no response is received within the specified timeout period.
Use circuit breaker...
I applied via Naukri.com and was interviewed in Dec 2024. There was 1 interview round.
Java 8 introduced lambda expressions, Java 11 added local-variable syntax for lambda parameters, and Java 17 included sealed classes and pattern matching.
Java 8 introduced lambda expressions for functional programming.
Java 11 added local-variable syntax for lambda parameters to simplify code.
Java 17 included sealed classes to restrict inheritance and pattern matching for instanceof checks and type casts.
Count the number of words in a given string.
Split the string by spaces and count the number of resulting elements.
Handle edge cases like multiple spaces or empty strings.
Consider punctuation marks as part of words unless specified otherwise.
I applied via Naukri.com and was interviewed in Jul 2024. There were 2 interview rounds.
It had java programming and aptitude tests and MCQs
I applied via Job Fair and was interviewed in Oct 2024. There were 4 interview rounds.
Onlin test consist pf easy numerical questions
Easy questions not so difficult
Yes, I am willing to work in any location for the right opportunity.
I am open to relocating for the right job opportunity
I am flexible and adaptable to new environments
I believe working in different locations can provide valuable experiences and growth opportunities
I applied via Naukri.com and was interviewed in Aug 2024. There was 1 interview round.
Transactions in Spring Boot manage database operations as a single unit of work to ensure data integrity.
Spring Boot provides support for declarative transaction management using @Transactional annotation.
Transactions can be configured at class or method level.
Transactions can be rolled back in case of exceptions to maintain data consistency.
Example: @Transactional annotation on a service method ensures that all databa...
ArrayList is resizable array implementation, LinkedList is doubly linked list implementation.
ArrayList uses dynamic array to store elements, LinkedList uses doubly linked list.
ArrayList is faster for accessing elements by index, LinkedList is faster for adding/removing elements.
Example: ArrayList
REST API is used to communicate between client and server using HTTP methods like GET, POST, PUT, DELETE.
REST API allows clients to access and manipulate resources on a server using standard HTTP methods.
It uses URLs to identify resources and HTTP methods to perform actions on those resources.
Common HTTP methods used in REST API are GET (retrieve data), POST (create data), PUT (update data), DELETE (remove data).
REST A...
Annotations in Spring Boot are used to provide metadata about the application and its components.
Annotations are used to configure Spring Boot applications, define beans, handle requests, etc.
Examples include @SpringBootApplication, @RestController, @Autowired, @RequestMapping, etc.
Java 8 introduced several new features including lambda expressions, functional interfaces, streams, and default methods in interfaces.
Lambda expressions allow for more concise code and enable functional programming.
Functional interfaces are interfaces with a single abstract method, used for lambda expressions.
Streams provide a way to work with collections of objects in a functional style.
Default methods in interfaces ...
Interfaces in Java are implemented using the 'implements' keyword, allowing classes to provide specific implementations for methods defined in the interface.
Interfaces in Java define a contract for classes to implement, specifying method signatures without implementations.
A class can implement multiple interfaces by separating them with commas.
Classes implementing an interface must provide concrete implementations for ...
Stream API in Java provides a way to process collections of objects in a functional style.
Stream API allows for functional-style operations on collections like map, filter, reduce, etc.
It supports lazy evaluation, meaning operations are only performed when needed.
Streams can be sequential or parallel, depending on the source and operations used.
Spring Boot simplifies the setup and development of Spring applications by providing a convention-over-configuration approach.
Spring Boot eliminates the need for XML configuration by using annotations and sensible defaults.
It includes embedded servers like Tomcat, Jetty, or Undertow, making it easy to deploy standalone applications.
Auto-configuration feature reduces the amount of boilerplate code needed to set up a Spr...
throw is a keyword used to explicitly throw an exception, while Throwable is a class that serves as the base class for all exceptions in Java.
throw is used to throw an exception in a method, while Throwable is the superclass of all exceptions in Java.
throw is followed by an instance of Throwable class or its subclasses, while Throwable is a class that provides common methods for handling exceptions.
Example: throw new N...
I applied via Company Website and was interviewed in Oct 2024. There were 3 interview rounds.
First round is quit easy
2 coding question based on dsa
SDLC stands for Software Development Life Cycle, which consists of different phases from planning to maintenance.
1. Planning phase involves defining project scope, requirements, and creating a project plan.
2. Analysis phase focuses on gathering and analyzing requirements to create a detailed system design.
3. Design phase involves creating a high-level design, detailed design, and architecture for the software.
4. Implem...
The 4 pillars of data structure are arrays, linked lists, stacks, and queues.
Arrays: Data structure that stores a collection of elements with a fixed size.
Linked Lists: Data structure where each element points to the next element in the sequence.
Stacks: Data structure that follows the Last In First Out (LIFO) principle.
Queues: Data structure that follows the First In First Out (FIFO) principle.
Interview experience
based on 14 reviews
Rating in categories
System Engineer
1.1L
salaries
| ₹1 L/yr - ₹9 L/yr |
IT Analyst
67.6k
salaries
| ₹5.1 L/yr - ₹16 L/yr |
AST Consultant
51.3k
salaries
| ₹8 L/yr - ₹25 L/yr |
Assistant System Engineer
29.9k
salaries
| ₹2.2 L/yr - ₹5.6 L/yr |
Associate Consultant
28.9k
salaries
| ₹9 L/yr - ₹32 L/yr |
Amazon
Wipro
Infosys
Accenture