concept category in category java

This is an excerpt from Manning's book Enterprise Java Microservices.
Figure 2.4 is the current administration interface for Cayambe. Viewing or updating categories in the UI isn’t possible except for the main category Transportation. This is far from an ideal situation, so you’ll begin by developing a new administration site and microservice to handle managing the product categories.
The main screen for your application is a tree of categories. Populating the list on the screen requires a RESTful endpoint to retrieve all the categories from the database.
Listing 2.5. @POST on CategoryResource
@Path("/") public class CategoryResource { ... @POST #1 @Path("/category") @Consumes(MediaType.APPLICATION_JSON) #2 @Produces(MediaType.APPLICATION_JSON) #3 @Transactional public Response create(Category category) throws Exception { if (category.getId() != null) { #4 return Response .status(Response.Status.CONFLICT) .entity("Unable to create Category, id was already set.") .build(); } try { em.persist(category); #5 } catch (Exception e) { return Response .serverError() .entity(e.getMessage()) .build(); } return Response .created(new URI(category.getId().toString())) .build(); #6 } ... }In addition, the CategoryResource has RESTful endpoints defined to retrieve and update a category. The code for the additional methods is available in the chapter 2 source.

This is an excerpt from Manning's book OCA Java SE 8 Programmer I Certification Guide.
In this section, you’ll learn about the categories of exceptions in Java: checked exceptions, runtime exceptions, and errors.
In this section, we’ll take a look at common exception classes and categories of exceptions. You’ll also learn about the scenarios in which these exceptions are thrown and how to handle them.
For this exam, you should be familiar with the scenarios that lead to these commonly thrown exception classes and categories and how to handle them. Table 7.2 lists common errors and exceptions. Although the exam specifically lists four runtime exceptions, you might see the other common exception and error classes on the exam.