Home » Core Java (page 10)

Core Java

Java 9 Jshell Tutorial

1. Introduction In this article we will learn about Java 9 Jshell. The Java Shell tool (JShell) is an interactive tool for learning the Java programming language and prototyping Java code. JShell is a Read-Evaluate-Print Loop (REPL), which evaluates declarations, statements, and expressions as they are entered and immediately shows the results. The tool is run from the command line. Using ...

Read More »

Java Singleton Design Pattern – Best Practices with Examples

In this post, we feature a comprehensive Tutorial on Java Singleton Design Pattern. Design Patterns in Java are incredibly popular among the software developers. One of the most common interview questions is the Singleton Design Pattern. So in this tutorial, I’ll summarize the best practices which will help developers dodge general issues and develop better applications. Table Of Contents 1. ...

Read More »

MySQL Workbench Tutorial

MySQL Workbench is one of the most used tools to work with MySQL-based databases and manage schema for a database, data in tables and reverse engineering the schema definitions. The reason MySQL Workbench is so popular is the easiness it provides when working with MySQL databases. It provides a visually intuitive DB design tool which integrates many functionalities like: Creating databases Managing ...

Read More »

Java JDBC PostgreSQL Connection Example

This article is a Java JDBC PostgreSQL Connection Example. PostgreSQL is an object-relational database management system. It’s one of the most popular databases used in the world. This article will show you how Java connects to it using JDBC. 1. Tools and Requirements PostgreSQL download Eclipse Oxygen PostgreSQL JDBC driver download 2. Development Environment Setup This example is set up ...

Read More »

Java XPathConstants Example

In this example, we will be discussing about Java class XPathConstants with an example. Before we start with this article, it is expected that we have a basic understanding of XML. In brief, XML stands for eXtensible Markup Language, which is designed to store and transport data. It is both human and machine readable. 1. Introduction XPath is a standard syntax recommended by ...

Read More »

Java 8 Convert a String to LocalDate Example

Hello readers, in this tutorial, we will learn how to convert a given response string into a java.time.LocalDate object. 1. Introduction These days in the programming universe Date and Time handling are the most time-consuming tasks in Java. In the ancient Java world, developers were dependent on the complex SimpleDateFormat class to convert and format the Date strings into the ...

Read More »

Java 8 Filter Null Values from a Stream Example

Hello readers, in this tutorial, we will learn how to filter the null elements from a Stream in Java. 1. Introduction Java Stream is a sequence of elements that support the sum operations. In streams, the elements are reckoned on demand from different data sources such as Collections, Arrays or I/O resources and thus the elements are never stored. Streams ...

Read More »

Java 8 Map Sorting Example

Hello readers, in this tutorial, we will learn how to Sort a Map using Java8 Stream’s API and Lambda expression. 1. Introduction These days in the programming universe sorting a map is one of the most habitual tasks in Java. In the ancient Java world, developers could sort a Map either by its keys or values. In Java8, JDK developers ...

Read More »

ByteCode primer for Java Class Files

It is often stated that to be good at the programming language you code in, one should at least dig and understand one abstraction level lower than the one in which you are coding. For Java, that would be the JVM, which would imply byte code. In this article we will kick start our adventures in Java byte code. Byte ...

Read More »

Java 8 Read a File Line by Line Example

Hello readers, in this tutorial, we will learn the Java8 Stream’s API for reading a file’s content line-by-line and we will explore its different characteristics. 1. Introduction These days in the programming universe reading the file content is one of the most habitual files manipulation task in Java. In the ancient Java world, the code to read the text file ...

Read More »