Home » Core Java

Core Java

Java RunnableScheduledFuture Example

In this article we will learn about java.util.concurrent.RunnableScheduledFuture class which was introduced in Java 6. 1. Introduction Java RunnableScheduledFuture is a ScheduledFuture that is Runnable. Successful execution of the run method causes completion of the Future and allows access to its results. public interface RunnableScheduledFuture<V> extends RunnableFuture<V>, ScheduledFuture<V> To know how RunnableScheduledFuture works first we need to learn about java.util.concurrent.Future. 1.1 ...

Read More »

Getting Started With Google’s HTTP Client Library for Java

Google’s HTTP Client Library for Java is a one-stop shop for all your HTTP client needs, irrespective of the Java platform (application server, Android, App Engine etc.). It offers a well-designed abstraction layer over a number of lower level HTTP client implementations (we’ll talk more about this later). The only downside is that the official documentation on it is minimal ...

Read More »

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 »