Home » Core Java

Core Java

Java CompletionStage and CompletableFuture Example

java-logo

1. Introduction Java JDK8 included the big fat interface called CompletionStage in the java.util.concurrent package. The same package also contains CompletableFuture which is a library implementation of CompletionStage. In this post we would see how CompletionStage and CompletableFuture provide piped asynchronous API thus enhancing reactive programming support in Java at the platform level. Since we are talking about JDK8 APIs, ...

Read More »

JAXB Binding Example

java-logo

JAXB stands for Java Architecture for XML Binding. JAXB provides convenient way to bind XML schemas and Java representations, making it easy for developers to work with XML data and its processing in Java based applications. To help with this, JAXB provides methods for unmarshalling XML instance documents into Java content trees, and then marshalling Java content trees back into ...

Read More »

org.apache.commons.net.ftp.ftpclient Example

apache-commons-net-logo

In this example we are going to elaborate the use of the FTPClient class in the package: org.apache.commons.net.ftp, as the package name says, it is a member of the Apache Commons, and deals with the FTP. As like other classes of the Apache Commons This class also provides us with some really helpful methods. The methods of this class as other classes ...

Read More »

Java Swing MVC Example

java-logo

In this example we are going to demonstrate Java Swing MVC, The MVC pattern is a model of how a user interface can be structured. Therefore it defines the following 3 elements: Model that represents the data for the application. View that is the visual representation of that data. Controller that takes user input on the view and translates that ...

Read More »

Spock Tutorial for Beginners

java-logo

Table Of Contents 1. Introduction 2. Environment 3. Learn By Example 3.1. Create and configure a Gradle project in Eclipse IDE 3.2. Build your project 3.3. Let’s get Groovy and Spocky 4. References 5. Conclusion 6. Download the Eclipse project 1. Introduction Spock is a testing framework for Java and Groovy applications. It’s very own Junit Runner, Sputnik, makes it ...

Read More »

JavaFX Layout Example

java-logo

This is a JavaFX Layout example. JavaFX contains several layout-related classes, which are the topic of discussion in this example. It is divided into the following sections: Layout Pane Group Region Pane HBox VBox LowPane BorderPane Stackpane TilePane GridPane AnchorPane Each topic contains a description of the according layout class and a simple example. The layout classes are very powerfull ...

Read More »

Lwjgl Tutorial

java-logo

LWJGL, which stands for Lightweight Java Game Library, it’s a library wrapper that allows us the use of OpenGL and OpenAL from Java. In this tutorial we are going to download the library, configure it on eclipse and create a window and setup a bare bones game loop to draw a basic shape with some animation. LWJGL is the library ...

Read More »

Lucene Analyzer Example

apache-lucene-logo

In this example, we are going to learn about Lucene Analyzer class. Here, we will go through the simple and fundamental concepts with the Analyzer Class. Previously, we have already gone through some of basic and implementation concepts with StandardAnalyzer Class with our indexing example. Here, we will go through the usage and description of main Analyzer Class provided in Lucene. ...

Read More »

Websphere MQ Tutorial

java-logo

1. Introduction WebSphere MQ is an IBM product launched in March 1992. It was initially called MQ series and then renamed to WebSphere MQ(commonly called MQ) in 2002 in order to join collection of WebSphere products. It is a messaging middleware that allows independent and potentially non-concurrent applications on a distributed system to securely communicate with each other regardless of ...

Read More »

JavaFX TreeView Example

java-logo

This is a JavaFX TreeView example. A TreeView is a control that displays hierarchical data in a tree-like structure. Each item in a TreeView is an instance of the TreeItem class. The following example creates and displays a TreeView with different kinds of vehicles. The TreeView class is defined in the javafx.scene.control package of the JavaFX API. The following examples ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials