Home » Archives for Chandan Singh » Page 7

Author Archives: Chandan Singh

Chandan holds a degree in Computer Engineering and is a passionate software programmer. He has good experience in Java/J2EE Web-Application development for Banking and E-Commerce Domains.

Java ReentrantLock Example

In this example, we shall be demonstrating how to use ReentrantLock in Java. Rigidness of Intrinsic Locking : The traditional way of providing synchronization in multi-threaded environment was to use the synchronized keyword. However, the synchronized keyword is considered rather rigid under certain circumstances.For example, if a thread is already executing inside a synchronized block and another thread tries to enter the ...

Read More »

Java Custom Exception Example

In this example we will look briefly at the basics of Exception, in Java Programming Language. We will also see, how to create a custom Exception Class. 1. Basics of Exception As per oracle docs, An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program’s instructions. In laymen terms, when ...

Read More »

Generic Method Example in Java

In this example, we will be studying about generic methods and how to use the same in our programmes. Generic method, as the name suggests, is a method that does not specify the Type of its parameters, per se. Rather, it defines a criteria (or a place holder) by which, the method introduces its own type parameters. We will try ...

Read More »

Build Java EE Application with Ant and Eclipse Example

Now, that we have understood the basics of ANT in the previous example, we can now proceed to use the same, for building a Java EE Application. A typical Java Web-Application involves cleaning the old compiled Class and WAR files, re-compiling the source files, packaging it, into a WAR and finally, copying it into the deployment of the respective Web/Application ...

Read More »

Building Java Application with Ant and Eclipse Example

Apache ANT (Another Neat Tool) is an open-source & highly flexible Build Tool used for automated compiling, updating, testing & deploying Java Applications.One major advantage of ANT is that, it does not enforce any directory layout or other such coding conventions. In this example, we shall show how to use Apache Ant (1.9) with Eclipse IDE, to build a Java Application. So without further ado, ...

Read More »