OOPS Concept

Encapsulation: Wrapping up of data under a single unit. Variable or data hidden from other classes Getter/Setter Concept Advt: Data-Hiding, Increase Complexity,Reusability and Easy Testing Polymorphism: Polymorphism is the ability of an object to take on many forms. Parent class reference is used to refer to a child class object. Any Java object that can... Continue Reading →


Mulithreading: Allow two or more parts of program execute concurrently Threads are lightweight processes in process. Creation of Thread Extending Thread Class Implementing runnable interface Thread Class vs Runnable Interface Class cannot extend another class if extending thread class (not multi inheritance) Thread class have in built methods like yield and interrupt. Synchronized blocks Applied... Continue Reading →

Java Basics

Class : User defined blueprint or prototype for which objects are created. It contain properties or methods for all objects. <<access_modifier>> <<keywords>> <<class_name>> extends implements  { /************ * * Sample Class structure * ******/ } Constructor used to create new objects Fields/Properties provide state Methods manipulate state of object Type of classes: Inner Class :... Continue Reading →


JDK: JDK is intend to developer as it contain development tools such as compiler, javadoc, java debugger etc. Virtual Machine is software implementation of machine. Java is designed to run on virtual machine. VM: Self Contained simulation of physical machine. Single program execution VM or System VM for execution of OS. Process : Instruction Fetch,... Continue Reading →

Playing with Streams

Hi! Guyz, I just amazed by a example during my learning of java8 stream API let me tell you. Earlier if I have a list of objects and I want them to be filtered and made groups of no of objects on basis of some property of Object. I used to follow the approach shown... Continue Reading →

Regex Example: IP Validator

Problem: Check wheather an ip is a valid ip or not IP address has a predefined  form "A.B.C.D", where the value of A, B, C, and D may range from 0 to 255. Solution: Lets find the patern for A and same will be applied to other three as they follow same pattern. Lets assume A... Continue Reading →

Regex Example: Username Checker

Problem: Check following condition on a username Can contain alphanumeric number and underscore Must not start with a digit Can have length from 8 to 30 characters Solution: Lets generate pattern one by one. Start by checking first character of username which should not be a digit so we have to use range to check... Continue Reading →

Design Pattern Introduction

Hi, Let's get the basic knowledge of design patterns. I am not going to explain key points so that you will remember them easily.So, let's start with a basic. Design Patterns are the solution for commonly recurring issues. Usage of DP: Speed up development process because they are well-tested and proven the best solution. Communication... Continue Reading →

Spring MVC Hello World

Follow Steps as Go to File New Maven Project Move to Archetype Select webapp Enter group id & artifact id Now project has appeared in the project explorer. Open pom.xml by double click go to the last tab of that add following dependencies: <dependency>     <groupId>javax.servlet</groupId>     <artifactId>javax.servlet-api</artifactId>     <version>3.1.0</version> </dependency>     <!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->... Continue Reading →

Create a website or blog at WordPress.com

Up ↑