SrcCodes

Invoke and Execute Hello World Ant Script Programmatically using Java Code

Apache Ant is an XML-based build tool to automate different tasks like compile, assemble, test source code, building deployment packages and run Java applications. This Hello World example shows how to invoke and run a simple Ant script programmatically using java code.

Hibernate Hello World example using Maven build tool and SQLite database

This tutorial will help you to write an annotation based hibernate java program which will save some records into a database and fetch them all using Hibernate API. We will use Maven tool to build the project, Eclipse IDE to code and SQLite database to save / retrieve records. SQLite is

How to traverse a folder or directory recursively using Java File API

This example shows how we can traverse a folder or directory structure using recursive algorithm by writing a small java program using Java File API.

Hello World Example of Simple Logging Facade for Java or SLF4J

Simple Logging Facade for Java (SLF4J) is an abstraction of different logging frameworks (eg. log4j, java.util.logging, commons logging etc.). This gives the developer an opportunity to plug-in desired logging framework at deployment time without changing the code. To use SLF4J, it is required to include 3 jars SLF4J

How to perform binary search on a java.util.ArrayList

This example shows how an element of a java.util.ArrayList can be searched using 'binarySearch' method of java.util.Collections class. This method internally applies binary search algorithm to search a particular element.

SrcCodes © 2026