• Tutorials
  • Courses
  • Tracks

Advanced Java Quiz Day 68

Last Updated :
Discuss
Comments

Question 1

Which dependency is needed for validation in Spring Boot with Hibernate Validator?

  • spring-boot-starter-validation ✅

  • spring-boot-starter-data-jpa

  • hibernate-core

  • spring-boot-starter-thymeleaf

Question 2

Which annotation is used to ensure a field is not null in Hibernate Validator?

  • @NotBlank

  • @NotEmpty

  • @NotNull

  • @Size

Question 3

In Hibernate Validator, which annotation ensures a string is not null and not empty after trimming?

  • @NotNull

  • @NotBlank

  • @Length

  • @Min

Question 4

To validate method parameters in Spring Boot, which annotation is applied at the class level?

  • @Validated

  • @Entity

  • @Controller

  • @Configuration

Question 5

In Spring Boot, validation errors are typically captured in which parameter of a controller method?

  • BindingResult

  • HttpServletRequest

  • HttpHeaders

  • ResponseEntity

There are 5 questions to complete.

Take a part in the ongoing discussion