Accenture
Cloudely Interview Questions and Answers
Q1. Write a code of prime numbers 1 to 100 and write sql query.
Code for prime numbers 1 to 100 and SQL query.
Use a loop to iterate through numbers 1 to 100.
For each number, check if it is divisible by any number from 2 to itself-1.
If not divisible, it is a prime number.
SQL query: SELECT * FROM table_name WHERE number_column >= 1 AND number_column <= 100 AND is_prime = true;
Q2. What is wait, notify, notifyall
wait, notify, and notifyAll are methods used for inter-thread communication in Java.
wait() method causes the current thread to wait until another thread invokes the notify() or notifyAll() method for this object.
notify() method wakes up a single thread that is waiting on this object's monitor.
notifyAll() method wakes up all threads that are waiting on this object's monitor.
Q3. Difference between controller and rest controller
Controller is a general term for classes that handle requests in a web application, while RestController specifically handles RESTful requests.
Controller is a general term for classes that handle requests in a web application
RestController is a specialized type of controller that specifically handles RESTful requests
RestController is annotated with @RestController, while Controller is annotated with @Controller
RestController returns data directly in the response body, while C...read more
Q4. .diff between heap and stack memo
Heap is used for dynamic memory allocation, while stack is used for static memory allocation.
Heap memory is used for storing objects and is managed by the JVM, while stack memory is used for storing method calls and local variables.
Heap memory is larger in size compared to stack memory.
Heap memory is accessed randomly, while stack memory is accessed in a LIFO (Last In First Out) manner.
Examples: Objects created using the 'new' keyword are stored in the heap, while method call...read more
Q5. What is lambda expression
Lambda expression is a concise way to represent an anonymous function in Java.
Lambda expressions are used to provide implementation of functional interfaces.
They enable you to treat functionality as a method argument, or code as data.
Syntax: (parameters) -> expression or (parameters) -> { statements; }
Example: (int a, int b) -> a + b
Q6. Difference between spring and springboot
Spring is a framework for building Java applications, while Spring Boot is a tool that simplifies the setup and configuration of Spring applications.
Spring is a comprehensive framework for building Java applications, providing support for various modules like Spring MVC, Spring Security, and Spring Data.
Spring Boot is an opinionated tool that simplifies the setup and configuration of Spring applications by providing defaults for dependencies and configurations.
Spring Boot inc...read more
Q7. What is kubernets?
Kubernetes is an open-source container orchestration platform for automating deployment, scaling, and management of containerized applications.
Kubernetes helps in automating the deployment, scaling, and management of containerized applications.
It allows for easy scaling of applications by adding or removing containers based on demand.
Kubernetes provides features like self-healing, load balancing, and rolling updates for applications.
It simplifies the management of containers ...read more
More about working at Accenture
Interview Process at Cloudely
Top Java Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month