Java 9 new features

Java 9 is scheduled to be released in July 2017.  The Feature Extension Complete milestone was achieved in late December,. We will have a look at the new features in Java 9. Java 9 Features Module System (Jigsaw Project) JShell Collection Factory methods Private Methods in Interfaces Reactive Streams Multi Resolution Images API Process API … [Read more…]

Java 8 new features

In this article we are going to discuss the most important features of Java 8.  I would be discussing these features with examples. Functional Interfaces Functional interfaces are interfaces with exactly one method. They can have an annotation with @FunctionalInterface. A very good example of Function Interface is that of the Comparable. It has exactly … [Read more…]

Java Generics interview questions

Java Generics concepts

Here is a list interview questions that may be asked in interviews. Java Generics as a feature is one of the most controversial features added to Java Language. As a programmer, it is very important that the basic concepts of Generics should be very clear.  I have prepared a list of basic interview questions that … [Read more…]

RESTful Web Service interview questions

Restful API Questions What is REST? REST stands for Representational State Transfer. It is an architectural style of client-server application What are the constraints for REST architectural style? REST architectural style describes six contraints: Uniform Interface Stateless Cacheable Client-Server Layered System Code on Demand – Optional What is Uniform Interface? Uniform interface constraint defines the interface between … [Read more…]

External DTD: Failed to read external DTD ‘.dtd’, because ‘file’ access is not allowed due to restriction set by the accessExternalDTD property

[org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 36; External DTD: Failed to read external DTD ‘Custom.dtd’, because ‘file’ access is not allowed due to restriction set by the accessExternalDTD property.] Stacktrace Solution Add the following property to your vm arguments.

Top Java Hibernate interview questions


In this article, I will be listing the frequently asked interview questions on hibernate in java application. These questions are collected from real interviews. All these questions check whether a candidate has basic knowledge of the hibernate. 1)  What’s ORM? Object-Relational Mapping (ORM) is a technique that lets you query and manipulate data from a … [Read more…]

Check palindrome string in java

Palindrome String

In this tutorial we will write different solutions for palindrome string in java. In is one of the questions asked in interviews. What is a palindrome? A palindrome is a word, phrase, number or other sequence of units that can be read the same way in either direction. Here is an example of palindrome string. … [Read more…]

Convert binary to decimal example in Java

We will convert binary number to decimal using following two methods: Without using Integer.parseInt() Using Integer.parseInt() Write a program to convert binary to decimal without using Integer.parseInt() Output Write a program to convert binary to decimal using Integer.parseInt() Output Integer.parseInt() We used Integer.parseInt() in the second example.  The Javadocs about this method Parses the string argument as a … [Read more…]

Java OOPs interview questions and answers

It is very important to know the concepts of Object Oriented Programming(OOP) before you go for an interview for any of the OOPs languages like Java, C++ or Python.  Here I would be listing the mostly asked OOPs interview questions. And would also explain various OOPs concepts.   1. What is Object Oriented Programming? Object Oriented … [Read more…]

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [ .class]; nested exception is java.lang.ArrayIndexOutOfBoundsException:

Recently we switched from Java 7 to Java 8 and we were using spring 3.1.1. And once we started using the java 8 features in spring beans, we started to encounter the following stacktrace. Solution And the solution to this issue is to upgrade to spring 4.x or don’t use java 8 features in spring … [Read more…]