Pavan Archive

Java Design Patterns List

Here is the list of Java Design Patterns. I am putting all together for now, will try to add explanation and code samples shortly – Creational Patterns Abstract Factory Builder Factory Prototype Singleton Structural Patterns Adapter Bridge

Threads vs Processes

Threads and Processes helps in concurrent execution of any application. Article lists out some basic points to compare Threads vs Processes Process: an architectural construct : can affect the architecture of an application. processes are independend execution units

Object oriented concepts – Java

Q: What are basic OOPS Concepts? A: – Inheritance : When a child class acquires all the methods and properties of parent class it is called inheritance. Java supports inheritance either using classes or interfaces. Encapsulation: In above class,

Java Sorting using Comparator

Lets see how we can sort our Employee objects using different criteria like id, name, salary. SortTest remains the main class that will perform creating and filling objects for us. This time employee class is plain old

Java Sorting using Comparable

In Java you can do sorting by implementing 2 interfaces 1) Comparable 2) Comparator Here we will see sorting example using Comparable Interface. As an example we will be sorting objects of Employee class. When using comaprable

Get all urls from a web page

Here I’m going to post a class that will extract all valid urls from a web page. My class uses “URLConnectionReader” provided by Sun Tutorial Class defines 2 constructors. One by default returns you the vector containing