• 28 June

    Java bloggers meet to celebrate 20th birthday of java, hosted by oracle

    Oracle has invited java bloggers at Hyderabad campus on 13th June 2015 and we celebrated Java ‘s 20th birthday. Few days back, I got an invitation mail for this event and I was more than happy to join them. It was really pleasure to meet other java bloggers and interact with them. It started with […]

  • 25 June

    How to iterate over Map or HashMap in java

    In this post, we will see how  can we iterate a map in java. There are four ways of iterating over a map, HashMap or TreeMap. Java HashMap tutorial: HashMap in java How HashMap works in java hash and indexfor method in HashMap hashcode and equals method in java How to sort HashMap by keys […]

  • 24 June

    How to iterate a list in java

    In this post, we will see how  can we iterate a list in java. There are four ways of iterating over a list. For loop For each loop(Java 5) While loop Iterator Below example will help you to understand, how to iterate list in java. I am taking custom object list to understand better 1. […]

  • 17 June

    Difference between ArrayList and LinkedList in java

    One of the common interview question is “What is difference between ArrayList and LinkedList”.Before we actually see differences,let me give you brief introduction of both. ArrayList ArrayList is implementation of list interface. ArrayList is not synchonized(so not thread safe) ArrayList is implemented using array as internal data structure.It can be dynamically resized . LinkedList LinkedList […]

  • 16 June

    Java Thread Join Example

    In this post, we will see about Java thread join method. Thread class’s join() method can be used to stop current execution of thread until thread it joins, completes its task. So basically, it waits for the thread on which join method is getting called, to die.For example: Here when you call t1.join(), main thread […]

  • 14 June

    Java Thread Sleep

    Sleep method of java.lang.Thread is used to pause current execution of thread for specific period of time. Some important points about sleep method are : It causes current executing thread to sleep for specific amount of time. Its accuracy depends on system timers and schedulers. It keeps the monitors it has acquired, so if it […]

  • 14 June

    Java Thread example

    Thread can be called as light weight process. Java supports multithreading , so it allows your application to perform two or more task concurrently.  Multithreading can be of advantage specially when now a days, machine has multiple CPUs, so multiple tasks can be executed concurrently. Whenever we call main method in java, it actually creates […]

  • 05 June

    Introduction to complexity of algorithm

    “How will you calculate complexity of algorithm” is very common question in interview.How will you compare two algorithm? How running time get affected when input size is quite large? So these are some question which is frequently asked in interview.In this post,We will have basic introduction on complexity of algorithm and also to big o […]