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…]

Like this post? Don’t forget to share it!

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.

Like this post? Don’t forget to share it!

Top Java Hibernate interview questions

orm

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…]

Like this post? Don’t forget to share it!

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…]

Like this post? Don’t forget to share it!

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…]

Like this post? Don’t forget to share it!

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…]

Like this post? Don’t forget to share it!

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…]

Like this post? Don’t forget to share it!

Updating from spring 3.1 to spring 4.3

Recently I have been working on an application that was using Java 7 and Spring 3.1.1.  And we upgraded from Java 7 to Java 8.  And once we had Java 8 installed, all the spring beans seemed to work fine with spring 3.1.1. But once we started to use java 8 features in Spring beans, … [Read more…]

Like this post? Don’t forget to share it!

Increasing Subsequences – Leetcode

Given an integer array, your task is to find all the different possible increasing subsequences of the given array, and the length of an increasing subsequence should be at least 2 Example Input: [4, 6, 7, 7] Output:  [[4, 6], [4, 6, 7], [4, 6, 7, 7], [4, 7], [4, 7, 7], [6, 7], [6, … [Read more…]

Like this post? Don’t forget to share it!

Target Sum – Leetcode

Problem You are given a list of non-negative integers, a1, a2, …, an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and – as its new symbol. Find out how many ways to assign symbols to make sum of integers equal to … [Read more…]

Like this post? Don’t forget to share it!