• Concurrency in Java

    Low-Level Threading Creating and running threads. Refer. java.lang.Thread, java.lang.Runnable Runnable r = () -> System.out.println("job/task"); Thread t = new Thread(r); //1. new state t.start();// 2. Runnable state Thread States Thread Groups. java.lang.ThreadGroup Example: ThreadGroup tg = new ThreadGroup("srk"); Runnable...
  • #x Problem Solving Questions

    Here is a non-exhaustive list of problem-solving questions. Pre-read: Time and Space Complexity Big O CheatSheet Worst case scenario to be considered when benchmarking If Java is your programming language to solve, here is the Collections framework overview chart...
  • Many-Many JPA Mapping with Spring Boot

    The goal of this post is to establish Many-Many relationship between 2 JPA entities. Here are some of the real-world examples of Many-Many relationship student - course product - store person - hobby consultant - project actor - film...
  • 1-Many and Many-1 JPA Mapping with Spring Boot

    This post focuses on establishing 1-Many and Many-1 relationship between two entities in JPA. Terminology Owning Side or Child Entity: From a database standpoint it’s a table having the foreign key reference of the other tables. And, from JPA...
  • 1-1 JPA Mapping with Spring Boot

    This post provides an overview of establishing a 1-1 mapping between 2 entities in JPA. Let’s take an example of Driver, and DriverLicense, wherein each driver will have exactly one driver’s license, and a driver’s license is assigned to...