Author: geonikpal

  • Spring Boot Data JPA

    Spring Boot Data JPA

    In this article, we’ll go through how you can use Spring Boot Data JPA and annotations like @OneToOne, @OneToMany, and @ManyToMany to define the relations between that tables 1. Project Description Imagine that we would like to have something like an e-banking app and that we have 3 Entities: Moreover, the following rules apply to…

  • Java Record

    Java Record

    In this article, we’ll go through Java Record, which was introduced in Java 14 as a preview feature and became a permanent feature in Java 16 1. What is a Java Record Java Record is a type of class, that has some specific characteristics and restrictions: This means that by using records, you can omit…

  • NullPointerException in Java

    NullPointerException in Java

    In this article, we will talk about the infamous NullPointerException Java Error and how to solve it. 1. What is Null in Java? The null is a keyword and it means that an object’s address points to nothing. Moreover, all objects in Java are null by default unless we initialize them. Finally, a primitive can…

  • ArrayList in Java

    ArrayList in Java

    In this article, we’ll talk about ArrayList in Java, one of the most popular implementations of the List interface. 1. What is ArrayList in Java An ArrayList in Java is an implementation of the List interface. Hence, ArrayList is a List, however, if we take a look at the source code, we can see that…

  • Minimum Coin Change Problem in Java

    Minimum Coin Change Problem in Java

    In this article, we will explain how to solve the minimum coin change problem. 1. The Problem The problem is pretty simple, we have a list of coins or banknotes, for example, we can take euros: And a target amount that we want to achieve, let’s say 19 EUR. We can have 3 * 5…

  • Java List

    Java List

    In this article, we will talk about Java List, one of the most popular interfaces in Java. 1. What is a List in Java The Java List lives under java.util package and since it is an interface, it is not a concrete implementation. However, all implementations have some common characteristics: The UML diagram of List…

  • Java Substring

    Java Substring

    In this article, we’ll talk about Java substring method of String class. 1. What is substring Method in Java? The substring method lives under the String class and allows you to retrieve a substring of a specific string. It has two overloaded methods: 2. How to use substring method – Java substring Example In this…

  • Inheritance in Java

    Inheritance in Java

    In this article, we’ll go through Java Inheritance, one of the four Object Oriented Programming concepts, through detailed examples. 1. What is Inheritance in Java Inheritance in Java is just like the inheritance of characteristics that someone might get from his parents or grandparents. Exactly like in real life, children classes can inherit attributes or…

  • Spring Boot Cache

    Spring Boot Cache

    In this article, we’ll talk about how you can enable, configure and evict cache in Spring Boot. 1. Why Use Cache in Spring Boot? We mainly use an in-memory cache in order to enhance the performance of our application. For instance, let’s say you want a computational-heavy method that takes a lot of time to…

  • Encapsulation in Java

    Encapsulation in Java

    In this article, we’ll talk about one of the most important Object Oriented Programming concepts, Encapsulation in Java. 1. What is Encapsulation in Java Encapsulation in Java is a way to wrap members and methods of a class, into a single unit. Additionally, the goal of encapsulation is to hide all the data that should…