TCS
10+ WIN Creatives Interview Questions and Answers
Q1. How do you manage memory leakage in your application?
Memory leakage can be managed by identifying and fixing the root cause of the issue.
Use a profiler tool to identify the source of the memory leak
Analyze the code to find out if there are any objects that are not being used and can be removed
Ensure that all objects are properly disposed of after use
Use weak references instead of strong references where possible
Avoid creating unnecessary objects
Regularly monitor memory usage and perform garbage collection as needed
Q2. Stream Api program to sort employees using cities ?
Sort employees by cities using Stream API
Create a list of employees with their respective cities
Use Stream API to sort the list by cities
Print the sorted list of employees
Q3. can we use lambda expression without functional interface
No, lambda expressions can only be used with functional interfaces.
Lambda expressions are used to implement functional interfaces.
Functional interfaces have only one abstract method.
Lambda expressions provide a concise way to implement the abstract method of a functional interface.
If a lambda expression is used without a functional interface, it will result in a compilation error.
Q4. What is your technology stack?
My technology stack includes Java, Spring Boot, Hibernate, MySQL, and Angular.
Java for backend development
Spring Boot for creating RESTful APIs
Hibernate for ORM
MySQL for database management
Angular for frontend development
Experience with AWS and Docker
Q5. Write program to find even and odd number using lambda expression
Program to find even and odd number using lambda expression
Create a list of numbers
Use lambda expression to filter even and odd numbers
Print the even and odd numbers
Q6. how to change embedded server in springboot
To change embedded server in Spring Boot, modify the pom.xml file and application.properties file.
Update the pom.xml file with the desired server dependency
Update the application.properties file with the server port and context path
Restart the application to apply the changes
Q7. Difference between Controller and RestController
Controller is used for general MVC architecture while RestController is used for RESTful web services.
Controller is used for handling user requests and returning a view
RestController is used for handling RESTful web services and returning JSON/XML response
RestController is a specialized version of Controller
RestController is annotated with @RestController while Controller is annotated with @Controller
Example: @Controller is used for handling user login while @RestController i...read more
Q8. steps to create springboot application
Steps to create a Spring Boot application
Create a new Spring Boot project using Spring Initializr
Add necessary dependencies in pom.xml or build.gradle file
Create a main class with @SpringBootApplication annotation
Create necessary packages and classes for controllers, services, and repositories
Configure application properties in application.properties or application.yml file
Run the application using IDE or command line
Q9. Features of springboot
Spring Boot is a framework that simplifies the development of Java applications.
Provides a pre-configured environment for building production-grade applications
Uses embedded servers like Tomcat, Jetty, etc.
Supports auto-configuration, which eliminates the need for manual configuration
Offers a wide range of plugins and extensions for easy integration with other frameworks and tools
Q10. Advantages of microservice
Microservices offer advantages such as scalability, flexibility, and easier maintenance.
Scalability: Microservices can be scaled independently, allowing for better resource utilization and cost savings.
Flexibility: Microservices can be developed and deployed independently, allowing for faster time-to-market and easier updates.
Easier maintenance: Microservices are smaller and more focused, making it easier to identify and fix issues.
Examples: Netflix, Amazon, and Uber all use ...read more
Q11. hibernate vs jpa
Hibernate is an implementation of JPA, which is a specification for ORM in Java.
JPA is a specification for ORM in Java, while Hibernate is an implementation of that specification.
Hibernate provides additional features beyond the JPA specification.
JPA is more portable across different ORM implementations, while Hibernate is more feature-rich.
Hibernate is often used in enterprise applications where complex mappings and caching are required.
More about working at TCS
Reviews
Interviews
Salaries
Users/Month