Home » Core Java

Core Java

Java 8 Stream – flatMap & Optional Example

Hello. In this tutorial, we will talk and understand the most commonly used Java 8 Stream APIs: the flatMap method and the Optional class. 1. Introduction Before diving deep into the practice stuff let us understand the flatMap method and Optional class in java programming. 1.1 flatMap() method This method is used to convert a stream of collections to a ...

Read More »

SQL GROUP BY Statement

1. Introduction In this article, we will look at the Group by Clause. We can use the Group By clause with all the databases that support SQL. We will see how we use Group BY in the MySQL database. 2. SQL Group By Clause The Group By is a clause that clumps data into groups based on a shared value. ...

Read More »

Java Runtime Environment Tutorial

In this article, we’re going to discuss Java Runtime Environment, the bundle used to run Java applications and libraries. 1. What is a runtime environment? The runtime environment is the environment in which a program or application is executed. As soon as a software program is executed, it is in a runtime state. Java Runtime Environment (JRE) is the software ...

Read More »

Java 8 Stream – Map & Collect Example

Hello. In this tutorial, we will explain the most commonly used Java 8 Stream APIs: the map() and collect() methods. 1. Introduction Before diving deep into the practice stuff let us understand the map and collect methods. 1.1 map() method This method is used to convert an object to something else. Represented by the syntax – map() method <R> Stream<R> ...

Read More »

Java 8 Stream – filter() & forEach() Example

Hello. In this tutorial, we will explain the most commonly used Java 8 Stream APIs: the forEach() and filter() methods. 1. Introduction Before diving deep into the practice stuff let us understand the forEach and filter methods. 1.1 forEach method This method is used to iterate the elements present in the collection such as List, Set, or Map. It is ...

Read More »

How to Download and Install Java 16

In this article, we will explain how to Download and Install Java 16. 1. Introduction Oracle released JDK 16 on March 16, 2021. Let’s see how to download and install Java 16 (Oracle JDK 16). 2. Download Oracle JDK 16 In this step, I will download the installer from the Oracle website. First, open a web browser and navigate to ...

Read More »

SQL Join Tutorial

In this article, we will discuss JOINs in SQL (Structured Query Language), various types of JOINs, and their syntax. We will also run SELECT queries using different types of JOINs on data in sample tables and view the result sets. 1. Introduction In real-world applications, data are stored in RDBMS (Relational Database Management Systems) by removing redundancy and assigning primary ...

Read More »

Build a REST API with Spring and Java Config

In this article we’ll see how to build a REST API using Spring Boot and Java Config. 1. Introduction Spring is a diversified framework and we can build basically any kind of application using its tools. Also, a majority of applications today use Spring Boot as the background of web services to connect and create a Server-Client solution. In the ...

Read More »

SQL Injection

This article will look at what SQL injection means and a few ways to prevent it. 1. What is SQL injection? SQL injection is a security problem in SQL. It is one of the most common hacking techniques for any database. An SQL injection happens when we try to receive user input from the user interface, such as a username. Instead ...

Read More »

Java 16 New Features Tutorial

1. Introduction Java 16 has a list of new features. In this tutorial, I will demonstrate the following new features: Java language – add a new java.lang.record type and the instanceof the method supports pattern matching.Java API – Stream API adds toList() and mapMulti() methods. 2. Technologies Used The example code in this article was built and run using: Java ...

Read More »