What is the idea of multithreading?
Java
What is the purpose of using Kafka when interacting with the service?
What are message brokers?
What is a Parallel Stream?
What are the advantages and disadvantages of using Hibernate when working with databases in Java projects?
What is the semantics of 'as-if-serial'?
What do you know about the Exists operator?
What is the purpose of the final modifier in Java and in what situations is its use justified?
What is the role of the @Primary annotation in the Spring framework and when should it be used?
What is the difference between static and dynamic binding in Java?
What is a constructor in Java?
What is the purpose and main functions of collections in Java?
How to register a JDBC driver?
Is it possible to create subclasses of the built-in String type in a programming language?
How is the first node in a linked list determined?
Which configuration will have priority: XML, Java, or annotations?
What is JavaServer Pages (JSP)?
@PutMapping("/create") public Book create(Map<String, Object> map) throws Exception { System.out.println("Check if book exists " + map); Book book = new ObjectMapper().convertValue(map, Book.class); Book b = repo.findByTitle(book.getTitle()); if (b != null) { throw new Exception("Book already exists"); } book.setId(UUID.randomUUID().toString()); repo.save(book); log.debug("Book {} by {} is created with id {}", book.getTitle(), book.getAuthor(), book.getId()); return book; } public BookStoreController(BooksRepository repo, Boolean bool, List<String> keys) { this.repo = repo; if (Boolean.TRUE.equals(bool)) { // check first key if(keys != null && !keys.isEmpty()){ String firstKey = keys.get(0); if (firstKey == "public") { for (String key : keys){ // ... some logic log.debug("Using key {}", key); }; } } } }
Is it allowed to have duplicate values within a Set collection?
Design a database schema for a cinema management system, considering information about halls, sessions, and seating.