Asynchronous & Scheduled Processing in Spring Boot

    Question 1SPRING BOOT ASYNC- Enabling Async Processing

    Which annotation enables asynchronous method execution in Spring Boot?

    Question 2SPRING BOOT ASYNC- Basic @Async Usage

    Which statement about @Async is correct?

    Question 3SPRING BOOT ASYNC- Code Snippet (@Async)

    What will happen when the sendEmail() method is called?

    @Service public class EmailService { @Async public void sendEmail(String recipient) { System.out.println("Sending email to: " + recipient); } }

    Question 4SPRING BOOT ASYNC- Async Return Types

    What return type is recommended when using @Async to track completion?

    Question 5SPRING BOOT ASYNC- @Scheduled Usage

    What is the role of @Scheduled in Spring Boot?

    Question 6SPRING BOOT ASYNC- Code Snippet (@Scheduled fixedRate)

    How often will the below method execute?

    @Scheduled(fixedRate = 5000) public void task() { System.out.println("Running task..."); }

    Question 7SPRING BOOT ASYNC- Code Snippet (@Scheduled fixedDelay)

    How does this method behave?

    @Scheduled(fixedDelay = 3000) public void process() { System.out.println("Task executed"); }

    Question 8SPRING BOOT ASYNC- Code Snippet (Cron Expression)

    What is the schedule for this method?

    @Scheduled(cron = "0 0 9 * * ?") public void reportTask() { System.out.println("Daily report generated"); }

    Question 9SPRING BOOT ASYNC- Enabling Scheduling

    Which annotation is required to enable @Scheduled annotations?

    Question 10SPRING BOOT ASYNC- Thread Pool for Async Tasks

    How can we define a custom thread pool for @Async methods in Spring Boot?