Spring Dependency Injection (DI)

In this tutorial you will learn about Spring Dependency Injection (DI) concept with example. Dependency Injection is a design pattern that allows us to remove dependencies from code so that its easier to maintain and test the code. Lets try to understand why we really need dependency injection. Consider two classes Circle and DrawShape as given below.

In this example DrawShape class is dependent on Circle class because we have used new keyword to create Circle object. In case

Read more

Java LinkedList Class

In this tutorial you will learn about Java LinkedList class. Linked list is a linear data structure that contains nodes. Node stores data and reference to the next node. Java provides us in built classes and methods for creating and handling of linked list. So using linked list in java so easy. Also Read: Java Singly Linked List Implementation Java LinkedList Class Hierarchy of this class is: Java.lang.object java.util.AbstarctCollection java.util.AbstractList java.util.AbstarctSequentialList java.util.LinkedList Now we see those built-in methods of this class.

Read more

10 Reasons Why Java is Secure Language

In this article you will learn about why java is secure language than any other programming languages. It is a common question asked in java interviews. We know that java is really popular and widely used language. Security is the prime factor for java popularity. Lets discuss about the reasons why it is so secure. Image Source Why Java is Secure Language? Own Memory Management Java has its own memory management mechanism. It has automatic garbage collection system. User need

Read more

Java Zip and Unzip Files and Folders

Here we will learn about how to zip and unzip files and folders in java. If information contains redundant data it will be tough to store and transfer the data. So we will go for compression which will give efficient representation of the data. For zipping many algorithms are there. Java provides the java.util.zip package for zipping and unzipping the files. The class ZipOutputStream will be useful for compressing. It is an output stream filter which will write files to

Read more

Spring Architecture – Spring Modules

In this tutorial we will take a look on spring architecture and various spring modules. Spring Framework is organized into 20 modules which are arranges in 6 groups as listed below. Core Container Aspect Oriented Programming Instrumentation Web Data Access/Integration Test Lets discuss each of them in brief. Spring Architecture and Spring Modules Image Source Core Container Spring core container is the basis for the complete Spring framework. It provides an implementation for IoC that supports dependency injection. This provides

Read more

Spring Hello World Example

In this tutorial you will learn to create Spring hello world example. I used Spring 4 in this project but the process is same for any other spring version. Before starting the tutorial make sure you have eclipse and jdk on your system. Spring Hello World Example Step 1: Create Java Project Open eclipse ide and create a java project with any name, here I am creating the project with name SpringHelloWorld. You can create the project by going to

Read more

Error could not find or load main class in Eclipse – 3 Ways to Fix

In this tutorial you will learn about the error could not find or load main class in eclipse and the ways that could solve this error. When class loader is unable to load the main class of our application then this error will come. Many reasons are there for this has to be happen. Ways to Fix Error could not find or load main class in Eclipse 1. If Path is Incorrectly Specified This error will come mainly due to

Read more
1 2 3 4 14