Home » Core Java

Core Java

Java 9 Modules Tutorial

1. Introduction In this example, I would like to show you how to get started with Java 9 modules. Oracle JSR site has details of the features. Java 9 is a major release. At the time of writing this article, JDK 9 is currently available for early access download on the oracle site and is expected to be released on ...

Read More »

JUnit Run Tests in Parallel

In this example, we will show you the usage of JUnit while running test in parallel. We have seen lots of cases where we need to run our test cases in parallel. There might be multiple reasons for that like to run test cases in a small time or take advantage of the multi-core CPU so that all your test ...

Read More »

Java Nio Async HTTP Client Example

This article is an example of how to build a simple asynchronous Http client using Java Nio. This example will make use of the httpbin service for much of it’s test cases, which can also be verified via postman or curl. Although the examples work, this is by no means a production ready. The exhaustive Http client implementation was merely an ...

Read More »

JUnit HttpServletRequest Example

In this tutorial, we shall show users the way to test the HttpServletRequest using the JUnit. JUnit HttpServletRequest Example will help you to understand, how we can test the servlet part of the web application. We have seen in previous tutorials how we can use JUnit for testing our applications. It is the main testing framework that is used by ...

Read More »

JUnit DbUnit Example

In this tutorial, we shall show users the usage of the DbUnit framework. JUnit DbUnit example will lead you to the details of testing with the DbUnit. There are other tutorials on JUnit if you want to learn more about the JUnit. Click here to view the tutorials related to JUnit on Java Code Geeks. 1. Introduction DbUnit is a ...

Read More »

Java Nio ByteBuffer Example

This article is a tutorial on demonstrating the usage of the Java Nio ByteBuffer. All examples are done in the form of unit tests to easily prove the expectations of the API. 1. Introduction The ByteBuffer class is an abstract class which also happens to extend Buffer and implement Comparable. A Buffer is simply a linear finite sized container for data of a ...

Read More »

Java 9 Repl Tutorial

In this example, I would like to show you how to get started with Java 9 REPL (The Java Shell: Read-Eval-Print Loop). Oracle site has excellent details of the features. Here, I present some examples and details to get started along with some of the important features and commands of this useful feature added in Java 9. Jshell is a ...

Read More »

JUnit BaseMatcher Example

In this tutorial, we shall show users JUnit BaseMatcher Example. It is very common to test the matches in JUnit. It provides many inbuilt matchers for our testing. We have seen in our previous tutorials how we can test our methods with the help of matchers. In JUnit Hamcrest Example we have seen how JUnit matchers works. In this tutorial ...

Read More »

Java Nio Large File Transfer Tutorial

This article is a tutorial on transferring a large file using Java Nio. It will take shape via two examples demonstrating a simple local file transfer from one location on hard disk to another and then via sockets from one remote location to another remote location. Table Of Contents 1. Introduction 2. Technologies used 3. FileChannel 4. Background 5. Program 5.1. ...

Read More »

JUnit BlockJUnit4ClassRunner Example

In this tutorial we shall show users the JUnit BlockJUnit4ClassRunner Example. We will analyze and see when and why should we use the JUnit Blockjunit4classrunner. Also we will learn about the different runners that we sued in the JUnit. But in this tutorial we will have our main focus on JUnit Blockjunit4classrunner class. 1. Introduction JUnit provides different type of ...

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:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns