Author: geonikpal
Java Abstract Class
In this article, we’ll talk about what is an abstract class in java, why and how you should use it. 1. What is an Abstract Class in Java You can think of a Java abstract class as a semi-abstracted class, meaning that it is not an interface and at the same time it is not…
While Loop in Java
In this article, we’ll go through while loop in Java, one of the fundamental statements that every programmer should now 1. What is a Java While Loop? Java While Loop is a statement that allows you to execute a set of commands only if a statement evaluates to true. Additionally, while loop is used when…
Spring Boot @Component Annotation
In this article, we’ll go through what Spring Component Annotation is(@Component), how can you use it, and why you should use it. 1. What is Spring Boot Component Annotation @Component annotation is used in Spring Boot in order to mark a class of your codebase as a bean; this means that it will be included…
For Loop in Java
In this article, we’ll go through what for loop in Java is and how you can take full advantage of it. 1. What is a For Loop in Java Java for loop is a statement that allows you to run a set of commands, a predefined number of times(although if you use break or continue,…
Spring Boot Profiles
In this article, we’ll go through what profiles are in Spring Boot and how you can use them in, in detailed examples. 1. What is a Profile in Spring Boot? You can think of Spring Boot profiles as a way to choose which beans should get instantiated in the spring context, or what value should…
Final Keyword in Java
In this article, we will go through what the final keyword does in Java, and when and how you should use it. 1. What Does final Mean in Java The final keyword in Java has a different meaning depending on where you apply it: When it comes to a variable, it means that you cannot…
Java 8 Stream API
In this article, we’ll learn everything regarding Java Stream API that was introduced in Java 8, through detailed examples. 1. What Is a Java Stream? You can think of a stream as a sequence of elements, that allows you to perform sequential and parallel operations. Furthermore, you cannot add any elements once the stream has…
@ConfigurationProperties Annotation in Spring Boot
In this article, we’ll talk about how @ConfigurationProperties annotation works and how you can transform any configuration to a Java Object. 1. What is @ConfigurationProperties @ConfigurationProperties annotation, allows you to import any configuration that is located in application.properties and map it to a Java Object. Alternatively, you can use application.yml which enhances the readability of…
How to Initialize an Array in Java
In this article, we’ll go through how you can initialize an array in java, through detailed examples. 1. How to Initialize a 1D Array To create a one-dimension array in Java, the formula is the following: For example, we could initialize an array of type Person and length 3, with the following command: In addition,…