Home » Core Java

Core Java

Groovy List Example

groovy-logo

Table Of Contents 1. Introduction 2. List Declaration 3. Add Items 4. Remove Items 5. Item Lookup 6. Split List 7. Count 8. Apply 9. Conclusion 1. Introduction List is generally used as stack in software development world in order to push items in it for future use and to be able to fetch back in a desired way. In ...

Read More »

JUnit Integration Test Example

junit-logo

1. Introduction Integration tests are test cases that test highly coupled external services. A great example of this is services in a SOA environment. In this scheme we will create services (or micro services) that are usually deployed on a different container and only exposed specific implementation of it’s own, consumed by a more sophisticated system. By rule of thumb, we ...

Read More »

Gradle War Plugin (& Tomcat) Example

gradle-logo

In this example, we will learn how to package a WAR File and how to deploy it on Tomcat server, using Gradle War Plugin and Gradle Tomcat Plugin. 1. Introduction to Gradle War Plugin This is a basic Gradle plugin that allows packaging web applications in WAR files. This plugin adds a war task for us that we can invoke ...

Read More »

Groovy Map Example

groovy-logo

In this tutorial, I will show you how to evaluate the power of Groovy maps. You will provided codes for each case and I assume that you have a little bit back ground about groovy. Let’s have a look at map concepts in groovy step by step together. 1. Map Declaration Maps are generally used for storing key-value pairs in programming ...

Read More »

Lucene Query Parser Example

apache-lucene-logo

In this Example , we are going to learn about Lucene QueryParser class. Here, we go through the simple and fundamental concepts with the QueryParser Class. In my previous post, we went through the indexing, writing, searching and displaying steps for the indexing example. Here we go through the searching step i.e. more specifically the concepts with the QueryParser Class. Thus, this ...

Read More »

JUnit Best Practices

junit-logo

1. Introduction There are a lot of ways on how a developer can do JUnit test cases, but overall it really depends on the strategy of how a specific functional code can be tested to it’s limits. It’s the developers responsibility to introduce thorough test cases to make sure that the code is stable and ultimately does what it has ...

Read More »

Groovy Closure Example

groovy-logo

In this example I’ll explain closures in Groovy. According to Sabesta’s nice book Concepts of Programming Languages, defining a closure is a simple matter: “a closure is a subprogram and the referencing environment where it was defined.” But explaining it is not that simple. Sabesta explains the closure as a subprogram that can be assigned to a variable or passed to ...

Read More »

JUnit NetBeans Example

netbeans-logo

1. Introduction In this post I will introduce the basics of writing and running JUnit unit tests in NetBeans IDE. Testing an application is an integral part of the development cycle, and writing and maintaining unit tests can help ensure that the individual methods in your source code work correctly. The IDE’s support for JUnit testing framework allows developers to ...

Read More »

Gradle NetBeans Example

gradle-logo

In this example, we will explain how to integrate Gradle with NetBeans IDE and how to perform basic Gradle tasks. 1. Why use Gradle in NetBeans IDE? Gradle is a powerful tool for building and automation. It has many advantages, enabling the development of build scripts that are cross-platform and cross-IDE. You should have no problems migrating your Gradle-based applications ...

Read More »

JUnit Test Suite Example

junit-logo

1. Introduction A JUnit Test suite is used to bundle multiple test cases together in a single run. This is usually used if you want to integrated several JUnit Test cases that makes up a specific functionality from the integration. The developer uses the @RunWith and @SuiteClasses to run Suite tests for this purposes. In this example, I’ll be showing a ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.