Code Pumpkin

Subscribe

Marker Interface Interview Questions

December 12, 2017
Posted by Pumpkin

The interface in java is a mechanism to achieve abstraction and it is one of the most discussed topic in entry and mid level java developer interviews. In our previous articles on interface, we have seen various interface related topics like  Interface Evolution in Java  Difference between interface and abstract class  Functional interface in java 8  In this […]

What is magic number CAFEBABE in java class file?

November 29, 2017
Posted by Pumpkin

Java Compiler compiles a java source code into bytecode and stores it into .class file which will then get executed by JVM. Everybody knows about it. But do you know each class file in Java starts with magic number CAFEBABE?  compelling, isn't it? 😀  After reading this article, you will be able to answer below questions: […]

Find from where java class is loaded | Class Loader SubSystem

November 1, 2017
Posted by Pumpkin

In previous article, we discussed about 3 activites of Class Loader SubSystem i.e. Loading, Linking, Initialization and its Types of Class Loader  i.e. Bootstrap Class Loader or primordial Class Loader, Extension Class Loader, Application Class Loader or System Class Loader. We have also seen how these Class loader uses Delegation hierarchy algorithm  to load Classes into memory area. In this article we'll discuss more about Class Loader and how […]

What is optional and why it is there? | Java8

October 29, 2017
Posted by Pumpkin

Have you ever been tired of putting null checks all over the code to avoid any unnecessary NullPointerExceptions. Java 8 has introduced a new class Optional in java.util package. It is used to represent a value is present or absent. The main advantage of this new construct is that No more too many null checks and NullPointerException. It avoids […]

Trapping Rain Water | Algorithm Problem

October 29, 2017
Posted by Pumpkin

In this article, we are going to solve the trapping water problem also known as Raees's Liquor Tank problem. This kind of problems are asked very frequently in interviews and online programming challenges. Problem Statement We need to find the maximum volume of water/liquor that can be stored in between buildings or bars as shown in the […]

Merge Sort | Sorting Algorithm

October 15, 2017
Posted by Pumpkin

Merge Sort is a Divide and Conquer algorithm. Divide and conquer algorithms divide the original data into smaller sets of data to solve the problem. During the Mergesort process, the elements of the array or collections are divided into two parts. To split an array, Mergesort will take the middle element of the array and split the […]

Bubble Sort | Sorting Algorithm

October 15, 2017
Posted by Pumpkin

In Bubble sort, each element is compared with its adjacent element. If the first element is smaller than the second one, then the positions of the elements are interchanged, otherwise it is not changed. Then next element is compared with its adjacent element and the same process is repeated for all the elements in the array […]

Performance Issue with HashSet RemoveAll() method

October 12, 2017
Posted by Pumpkin

In our previous article on HashSet internals, we have seen internal implementation of its add(), remove(), contains(), clear(), iterator() and isEmpty() methods. One of our readers has raised question about How efficient is HashSet removeAll() method? As it requires detailed explanation, we have decided to write separate article on it.   What does removeAll() method do? Before going into internals of […]

Selection Sort | Algorithms

October 8, 2017
Posted by Pumpkin

In our previous articles, we have seen two of the searching algorithms like Binary Search and Fibonacci Search alogorithm. In this article, we will go through Selection Sort algorithm. Selection sort is one of the simplest sorting algorithm available. Before going into more details we will see first see why sorting is required in programming. Sorting […]

Fibonacci search

October 8, 2017
Posted by Pumpkin

In this article, we will see one more searching algorithm Fibonacci search. This searching algorithm has some similarity with Binary Search that we have seen in our last article. Both of them works on sorted arrays. Fibonacci Search is a comparison-based technique that uses Fibonacci numbers to search an element in a sorted array. Fibonacci Search Definition […]

Previous Posts

Total Post : 82
Subscribe
Contribute Your Articles

Interview Experiences

Related Books

Like Us On Facebook

Alexa Page Rank


global amazon link for wordpress by BestAzon