i
TCS
Filter interviews by
Transient variables are not serialized, so they are not transmitted over the network during serialization.
Transient variables are marked with the 'transient' keyword in Java.
They are excluded from the serialization process, meaning their values are not saved.
Example: If a class has a transient variable 'password', it won't be serialized.
When the object is deserialized, transient variables will have their default v...
Java 8 introduced several features like Lambda expressions, Streams, and Optional, enhancing code efficiency and readability.
Lambda Expressions: Allow for concise representation of functional interfaces. Example: (a, b) -> a + b.
Streams API: Enables functional-style operations on collections. Example: list.stream().filter(x -> x > 10).collect(Collectors.toList()).
Optional Class: Helps in avoiding NullPoin...
Exceptions are issues that can be handled, while Errors are serious problems that usually cannot be recovered from.
Exceptions are checked at compile-time, while Errors are unchecked.
Examples of Exceptions: IOException, SQLException.
Examples of Errors: OutOfMemoryError, StackOverflowError.
Exceptions can be caught and handled using try-catch blocks.
Errors indicate serious problems that a reasonable application shoul...
Java is not considered fully object-oriented due to its use of primitive data types, which are not objects.
Primitive Data Types: Java includes primitive types like int, char, and boolean, which are not objects, contrasting with pure OOP languages.
Wrapper Classes: To treat primitives as objects, Java provides wrapper classes (e.g., Integer, Character) that encapsulate these types.
Static Methods: Java allows static ...
What people are saying about TCS
Hibernate is an ORM framework that simplifies database interactions in Spring Boot applications.
Hibernate provides an abstraction layer over JDBC, reducing boilerplate code.
It maps Java objects to database tables using annotations, e.g., @Entity.
Hibernate supports lazy loading, which improves performance by loading data on demand.
It manages database transactions and provides a powerful query language (HQL).
Spring ...
Yes, static methods can be included in an interface starting from Java 8, allowing default behavior for interface methods.
Static Methods: Interfaces can have static methods that are called on the interface itself, not on instances of classes implementing the interface.
Example: In an interface 'MyInterface', you can define a static method like 'static void myStaticMethod() { ... }'.
Access: Static methods in interfa...
The standalone design pattern encapsulates functionality in a self-contained module, promoting reusability and separation of concerns.
Encapsulates functionality in a single module or class.
Promotes reusability by allowing independent use of the module.
Facilitates easier testing and maintenance due to separation of concerns.
Example: A utility class that provides static methods for string manipulation.
Can be used in...
Object-oriented programming (OOP) is based on concepts like encapsulation, inheritance, polymorphism, and abstraction.
Encapsulation: Bundling data and methods that operate on the data within one unit (class). Example: A 'Car' class with attributes like 'speed' and methods like 'accelerate()'.
Inheritance: Mechanism to create a new class from an existing class, inheriting its properties and behaviors. Example: 'Elec...
A REST API workflow involves client requests, server processing, and responses through defined endpoints.
1. Client initiates a request to the API endpoint (e.g., GET /users).
2. The server receives the request and processes it.
3. The server interacts with the database or other services as needed.
4. The server prepares a response, typically in JSON or XML format.
5. The server sends the response back to the client wi...
You can sort a list of integers in Java using Collections.sort() or Arrays.sort() methods.
Use Collections.sort(List<Integer> list) for sorting a List of integers.
Example: List<Integer> numbers = Arrays.asList(3, 1, 4, 1, 5); Collections.sort(numbers);
Use Arrays.sort(int[] array) for sorting an array of integers.
Example: int[] numbers = {3, 1, 4, 1, 5}; Arrays.sort(numbers);
I appeared for an interview in May 2025, where I was asked the following questions.
Transient variables are not serialized, so they are not transmitted over the network during serialization.
Transient variables are marked with the 'transient' keyword in Java.
They are excluded from the serialization process, meaning their values are not saved.
Example: If a class has a transient variable 'password', it won't be serialized.
When the object is deserialized, transient variables will have their default values...
A controller handles specific requests, while a front controller centralizes request handling for an entire application.
A controller is responsible for processing user input and returning the appropriate response.
A front controller acts as a single entry point for handling requests, delegating to specific controllers.
Example of a controller: In a Spring MVC application, a specific controller class handles requests for ...
I appeared for an interview in May 2025, where I was asked the following questions.
To find the second highest salary, we can use various methods like sorting, using a set, or iterating through the dataset.
1. Sort the salaries in descending order and pick the second element.
Example: [3000, 2000, 4000] -> Sorted: [4000, 3000, 2000] -> Second highest: 3000
2. Use a Set to remove duplicates, then sort.
Example: [3000, 2000, 3000, 4000] -> Set: [3000, 2000, 4000] -> Sorted: [4000, 3000, 20...
@Qualifier is an annotation in Spring Framework used to resolve ambiguity when multiple beans of the same type exist.
@Qualifier is used in dependency injection to specify which bean to inject when multiple candidates are available.
It can be applied to fields, methods, and constructor parameters.
Example: @Autowired @Qualifier("beanName") private MyBean myBean;
It helps in improving code readability and maintainability by...
I appeared for an interview in May 2025, where I was asked the following questions.
I appeared for an interview in Dec 2024, where I was asked the following questions.
OOP concepts like encapsulation, inheritance, and polymorphism were integral to our Java project, enhancing code modularity and reusability.
Encapsulation: We used private fields in classes and provided public getter and setter methods to control access.
Inheritance: Created a base class 'Animal' and derived classes 'Dog' and 'Cat' to share common behavior.
Polymorphism: Implemented method overriding in subclasses to prov...
Exceptions are issues that can be handled, while Errors are serious problems that usually cannot be recovered from.
Exceptions are checked at compile-time, while Errors are unchecked.
Examples of Exceptions: IOException, SQLException.
Examples of Errors: OutOfMemoryError, StackOverflowError.
Exceptions can be caught and handled using try-catch blocks.
Errors indicate serious problems that a reasonable application should not...
Collections in Java are frameworks that provide an architecture to store and manipulate groups of objects.
1. Types of Collections: List, Set, Map, Queue.
2. List: Ordered collection, allows duplicates. Example: ArrayList, LinkedList.
3. Set: Unordered collection, no duplicates. Example: HashSet, TreeSet.
4. Map: Key-value pairs, no duplicate keys. Example: HashMap, TreeMap.
5. Queue: Ordered collection for processing eleme...
VARCHAR2 is a variable-length character data type in SQL, primarily used in Oracle databases to store strings.
VARCHAR2 can store up to 4000 bytes of character data.
It is used for storing variable-length strings, optimizing storage space.
Example: VARCHAR2(50) can store a string of up to 50 characters.
VARCHAR2 is sensitive to character set and can store multi-byte characters.
Stack memory is used for static memory allocation and execution of thread-specific variables, while heap memory is used for dynamic memory allocation.
Stack memory is used for static memory allocation, such as local variables and function call stack.
Heap memory is used for dynamic memory allocation, such as objects created using 'new' keyword.
Stack memory is limited in size and typically faster to access, while heap mem...
I applied via Naukri.com and was interviewed in Jan 2024. There was 1 interview round.
Try-with-resources simplifies resource management in Java by automatically closing resources after use, preventing memory leaks.
Introduced in Java 7, it manages resources like files and sockets.
Syntax: try (ResourceType resource = new ResourceType()) { // use resource }
Automatically closes resources when the try block exits, even if an exception occurs.
Can be used with any class that implements AutoCloseable or Closeab...
Fundamentals of Java and the concept of Object-Oriented Programming (OOP).
We’re looking for java back end developer
Test was not that difficult just the basic programming questions
The duration of TCS Java Developer interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 39 interview experiences
Difficulty level
Duration
based on 643 reviews
Rating in categories
System Engineer
1.1L
salaries
| ₹1 L/yr - ₹9 L/yr |
IT Analyst
65.7k
salaries
| ₹5.1 L/yr - ₹16.8 L/yr |
AST Consultant
53.5k
salaries
| ₹8 L/yr - ₹25.5 L/yr |
Assistant System Engineer
33.2k
salaries
| ₹2.6 L/yr - ₹6.4 L/yr |
Associate Consultant
32.7k
salaries
| ₹9 L/yr - ₹33.7 L/yr |
Amazon
Wipro
Infosys
Accenture