i
TCS
Filter interviews by
I applied via AmbitionBox and was interviewed in Jun 2023. There were 3 interview rounds.
I'm going to have information on java 5 miniths
I will give the coding test on java 10 miniths
I applied via Referral and was interviewed in Jul 2024. There was 1 interview round.
Callable is used to return a result and can throw checked exceptions, while Runnable is used for void operations.
Callable can return a result and throw checked exceptions, while Runnable cannot.
Callable is a functional interface with a method call() that returns a result, while Runnable is a functional interface with a method run() that does not return a result.
Example: Callable
Use the Strategy design pattern for complex design.
Strategy pattern allows you to define a family of algorithms, encapsulate each one, and make them interchangeable.
It helps in separating the behavior of a class from the class itself, making it easier to switch between different algorithms at runtime.
Examples of using Strategy pattern include implementing different sorting algorithms in a class or defining various paym
To remove autoconfiguration in Spring Boot, exclude the specific autoconfiguration class from the application.
Exclude the autoconfiguration class using @EnableAutoConfiguration annotation with exclude attribute
Create a configuration class and exclude the specific autoconfiguration class using @EnableAutoConfiguration annotation
Use application.properties or application.yml to exclude autoconfiguration classes
Occurance each characters in a string
Java8 coding questions
I applied via Naukri.com and was interviewed in Nov 2023. There were 2 interview rounds.
Java 8 introduced several new features including lambda expressions, functional interfaces, streams, and default methods.
Lambda expressions allow writing concise and functional code.
Functional interfaces provide a way to define and use lambda expressions.
Streams enable processing collections of data in a functional and parallel way.
Default methods allow adding new methods to existing interfaces without breaking compati...
A functional interface is a single abstract method interface. It can be referred to using a lambda expression.
Functional interfaces have only one abstract method
Lambda expressions can be used to implement functional interfaces
Lambda expressions provide a concise way to write anonymous functions
Functional interfaces can be used as method parameters or return types
HashMap is a data structure in Java that stores key-value pairs. It is mutable while iterating through it.
HashMap is part of the Java Collections Framework.
It allows null values and at most one null key.
It provides constant-time performance for basic operations like get and put.
While iterating through a HashMap, it is mutable and can throw ConcurrentModificationException if modified.
To avoid this, use an Iterator or Co
The transient keyword in Java is used to indicate that a variable should not be serialized.
Variables marked as transient are not included in the serialization process
Transient variables are not saved when an object is serialized and are set to their default values when the object is deserialized
Useful for excluding sensitive or unnecessary data from being serialized
Merge and sort two arrays
Use the merge sort algorithm to merge and sort the arrays
Convert the arrays to a list of strings before merging and sorting
Handle null or empty arrays as special cases
Find duplicate element in array using Java 8 features.
Convert array to stream using Arrays.stream()
Use Collectors.groupingBy() to group elements by their occurrence
Filter the grouped elements to find duplicates
Various annotations used in SpringBoot
1. @SpringBootApplication: Marks the main class of a Spring Boot application
2. @RestController: Marks a class as a RESTful controller
3. @RequestMapping: Maps HTTP requests to handler methods
4. @Autowired: Injects dependencies automatically
5. @Component: Marks a class as a Spring component
6. @Service: Marks a class as a service component
7. @Repository: Marks a class as a repository ...
The different bean scopes in Spring are singleton, prototype, request, session, and application.
Singleton scope creates a single instance of a bean per Spring IoC container.
Prototype scope creates a new instance of a bean every time it is requested.
Request scope creates a new instance of a bean for each HTTP request.
Session scope creates a new instance of a bean for each HTTP session.
Application scope creates a single
To find the third highest salary in SQL, you can use the 'ORDER BY' clause and 'LIMIT' keyword.
Write a SQL query to select distinct salaries from the table
Order the salaries in descending order using the 'ORDER BY' clause
Use the 'LIMIT' keyword to limit the result to the third row
Retrieve the third highest salary from the result
Good coding questions related array and string
I applied via Company Website and was interviewed in Jul 2024. There was 1 interview round.
Series, English ,profit & loss
based on 1 review
Rating in categories
System Engineer
1.1L
salaries
| ₹1 L/yr - ₹9 L/yr |
IT Analyst
68.1k
salaries
| ₹5.1 L/yr - ₹16 L/yr |
AST Consultant
51.1k
salaries
| ₹8 L/yr - ₹25 L/yr |
Assistant System Engineer
31.4k
salaries
| ₹0.3 L/yr - ₹5.6 L/yr |
Associate Consultant
28.6k
salaries
| ₹8.9 L/yr - ₹31.9 L/yr |
Amazon
Wipro
Infosys
Accenture