Input Splits in Hadoop
When a MapReduce job is run to process an input data one of the thing Hadoop framework does is to divide the input data into smaller chunks, these chunks are referred as input splits in Hadoop.For each...
View ArticleInterface in Java
Interfaces help in achieving full abstraction in Java, as using interface in Java, you can specify what a class should do, but how class does it is not specified.Interfaces in Java looks syntactically...
View ArticleWhy main Method is static in Java
When we start learning java and make our first "Hello World" program, there are two things which stand out. File name and class name should be same.Main method signature - Public static void...
View ArticleHow to Loop Through a Map in Java
Before knowing how to loop or iterate a Map, HashMap or Treemap in Java, we need to know about two methods declared by Map interface that play a role in, how to iterate through a...
View Articlestatic in Java
When we want to define a class member that can be used independently of any object of that class we use static keyword in Java. When a class member is defined as static it is associated with the class,...
View ArticleInterface Default Methods in Java 8
Java 8 has added support for default methods as well as static methods to interfaces. In this post we'll talk about interface default methods in Java.Refer interface static methods in Java 8 to know...
View ArticleInterface Static Methods in Java 8
Java 8 has added support for interface default methods as well as interface static methods which is one of the important change in Java 8 along with the addition of lambda expressions and stream API....
View ArticleCovariant Return Type in Java
Before Java 5, when you overrode a superclass method in a subclass the method signature had to be exactly same, i.e. the name, argument types and return type of the overriding method in the sub-class...
View ArticleMarker Interface in Java
Marker interface in Java is an interface that has no method declarations or fields in it. It is used as a tag to let the compiler know it needs to add some special behavior to the class implementing...
View ArticleNested Try Statements in Java Exception Handling
A try-catch-finally block can reside inside another try-catch-finally block that is known as nested try statement in Java.In case a try-catch block can not handle the exception thrown, the exception...
View ArticleCreating Custom Exception Class in Java
Though Java's exception handling covers the whole gamut of errors and most of the time it is recommended that you should go with standard exceptions rather than creating your own custom exceptions in...
View ArticleHow HashMap Internally Works in Java
This post talks about HashMap internal implementation in Java, which is also a favourite Java Collections interview question.There are four things you should know about HashMap before going into...
View ArticleFail-Fast Vs Fail-Safe Iterator in Java
Difference between fail-fast and fail-safe iterator in Java, apart from being an important Java Collections interview questions, is a very important concept to know. The collections which are there...
View ArticleRace Condition in Java Multi-Threading
Race condition in Java occurs in a multi-threaded environment when more than one thread try to access a shared resource (modify, write) at the same time. Since multiple threads try to race each other...
View ArticleStatic Synchronization in Java Multi-Threading
With instance method synchronization, threads are executed one thread per instance. That may create problems when we have more than one instance of the same class. In that scenario you may have to...
View ArticleDeadlock in Java Multi-Threading
Deadlock in multi-threading describes a situation where two or more threads are blocked forever, waiting for each other. To describe it in a simple manner let's assume there are two threads Thread-1...
View ArticleHow LinkedList Class Works Internally in Java
In Java Collections framework there are two general purpose implementations of the list interface - ArrayListLinkedListOut of these two Arraylist internally uses an array of Object which can be...
View ArticleHow HashSet Works Internally in Java
Before going into internal working of HashSet in Java it is important to know two points about HashSet.HashSet in Java only stores unique values i.e. no duplicates are allowed.HashSet works on the...
View ArticleWhat is Dependency Injection in Spring
Dependency injection is one of the core concept of Spring framework and it is imperative to understand "What is Dependecy Injection" and how Spring uses it. It is hard to explain it in theory so I'll...
View ArticleJava Collections Interview Questions
In this post Java Collections Interview Questions are listed. This compilation will help the Java developers in preparing for their interviews.What is Java Collections Framework? What are the benefits...
View Article