Intersection of Two Linked Lists 1

The linked list L1 is  (1 -> 2 -> 3 -> 7 -> 8 -> 9 -> 4 -> 5 -> 6) having a length n and linked list L2 is (-1 -> -3 -> 9 -> 4 -> 5 -> 6) having a length m. So above both L1 and L2 are intersecting at ...

Design Pattern 1

Design Pattern We can divide design patterns into three board categories. 1. Creational Design Pattern: These are the ones that creates objects for you rather than instantiating them directly. This gives your program more flexibility in deciding which objects needs to be created for a given case. Ex:- Factory AbstartFactory Singelton Prototype 2. Structural Design ...

Loading Driver class before saying DriverManager.getConnection in JDBC call 4

These are some of the favorite lines we write for JDBC connectivity: In this particular example, I have used the MySQL driver to connect to MySQL database. This is also one of the favourite questions asked in interviews. First of all I can tell you what all questions can be asked in this topic: What ...

Java SE 7 Features Part – 2 3

1. Introduction In this post i will try to cover the below features of Java 7. ·        Using the @SafeVarargs annotation ·        Class Loaders ·        Concurrency   1.1.Using the @SafeVarargs annotation The improved varargs warnings are introduced in Java 7. The basic problem is the inability of generics and arrays to play well together. Generics ...

Quartz 2.0 (RamJobStore and JobStoreCMT)

Qaurtz 2.0 allows you to schedule your job manually or through QuartzInitializerListener. 1. Lets start first with manually scheduling the job. //Creating the Trigger : Trigger can be of two type:  Simple Trigger Cron Trigger : which will take cron expression for scheduling the job. a.) Simple Trigger (Run in every 5 sec)  Trigger trigger ...