Posts

Showing posts from November, 2015

Java new features

Image
In this post, I am sharing the popular java features by their released versions. This will help you to revised the latest features of JDK by their version and started with latest released. Java 8 Features Lambda Expressions Default Methods Type Annotations Streams Date Time API Nashhorn JavaScript Engine Performance Improvement for HashMaps with Key Collisions Removal of PermGen. TLS 1.2 Java 7 Features String in switch Try-with-resources statement Underscores in numeric literals Binary literals Multiple exception catching Improved Type Inference for Generic Instance Creation SafeVarargs NIO 2.0 Here is detail example of java 7 features. Popular Java 6 Features JDBC 4.0 Java Compiler API Kerberos and LDAP support. JAXB 2.0 Common Annotations XML Binding Java 5 Features Annotations Autoboxing/Unboxing Enhanced for Loop Generics Typesafe Enums Static Import Varargs Most of the time interviewer, asked you to list the new features of JDK, the above points ...

What is Fail Fast in java

Image
This is one of the popular topic in concurrent environment, where concurrent modification occurs. So In this post, I am going to explain you what is Fail-Fast in java iteration with a simple example, and how to avoid fail-fast. In my previous, post we have already seen an example of ArrayList and how to create our own arraylist in java and of course a detail comparison between ArrayList and LinkedList here . What is Fail Fast -  Fail - Fast, basically is an exception known as ConcurrentModificationException , an occurs as soon as collection's structure modifies during the iteration of collection elements except the iterators own method . That means if a collection modifies during it's iteration except the iterator's remove() method, than it will throws ConcurrentModificationException. Let's see an example where an ArrayList is modifies during its iteration using collection's remove method. FailFastExample .java , complete example to throw ConcurrentModificati...

Java J2EE Interview Questions For Experienced Set 1

Image
In my previous post, I have listed top 20 Exception handling interview questions here and 15 core java written interview questions for product based companies. Today, I have decided to post java,j2ee interview questions in different sets and each set will contain exactly 10 questions, which is similar to real time interview questions. The questions are based on real time interview experienced, and its for java,j2ee interview, that means combination of core java+hibernate+spring+algorithm+Design pattern etc. all about the real time interview question and based on real time pattern. If you are going for java,j2ee profile with Spring+Hibernate+Web Service than this set of questions is all yours. 1. Brief down your role and responsibilities, and what type of project you are working on. Interviewer start looking into your resume and asked this questions,This is very first question you will faced in any interview, and its your job to tell about your role(s) and designation in your curr...