Asynchronous & Scheduled Processing in Spring Boot

    Question 1: SPRING BOOT ASYNC- Enabling Async Processing

    Which annotation enables asynchronous method execution in Spring Boot?

    Question 2: SPRING BOOT ASYNC- Basic @Async Usage

    Which statement about @Async is correct?

    Question 3: SPRING 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 4: SPRING BOOT ASYNC- Async Return Types

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

    Question 5: SPRING BOOT ASYNC- @Scheduled Usage

    What is the role of @Scheduled in Spring Boot?

    Question 6: SPRING 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 7: SPRING BOOT ASYNC- Code Snippet (@Scheduled fixedDelay)

    How does this method behave?

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

    Question 8: SPRING 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 9: SPRING BOOT ASYNC- Enabling Scheduling

    Which annotation is required to enable @Scheduled annotations?

    Question 10: SPRING BOOT ASYNC- Thread Pool for Async Tasks

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