JAX-RS Hello World Example in Jersey Framework

In this tutorial we will see how to develop simple hello world Restful example in Jersey Framework. in this tutorial we are using Jersey 2.0 . 1. Create Dynamic web project in Eclipse. I am not using Maven here, I have uploaded all the required jars with example ,and you can download total application.The project structure […]

What is Hadoop ? What is big data ?

Hadoop is Apache’s open source framework which allows us to do processing of large data sets in distributed environment, Hadoop uses clustering model with thousands of computers /machines to process large volumes  and variety of data with high velocity. before we looking to Hadoop we need to know  what are origins for Hadoop.   what are the […]

what is the difference between comparable and comparator

In this tutorial we will learn what is the difference between comparable and comparator interfaces , and when we need to use comparable and when we need to use comparator. Basically “what is the difference between comparable and comparator ? ” is one of the Java interview question,  and in Java we have two interfaces which are using to […]

Simple Helloworld Servlet Example Program

In this tutorial we learn how to write a Simple Helloworld Servlet Example Progaram and how to run that servlet in Tomcat which is integrated with eclipse. 1. Create a dynamic project in eclipse.         Create a dynamic web project in eclipse(click “new” ->Dynamic web project) and add below servlet class to project […]

Spring Propertyplaceholderconfigurer Example

In this tutorial we see what is the use of Spring’s Propertyplaceholderconfigurer class in detail. In general , in software development we will maintain some details in properties files , like database credendetials , smt server deatils …etc., but those details we maintain in different properties files and will write a logic and will read those detail for […]

Exception in thread “main” java.lang.IllegalStateException: CGLIB is required to process @Configuration classes

During developing Spring applications we might get below exception, basically we might get this exception when we are using “@Configuration” annotation in our Application and we are not adding the “cglib-nodep”  jar in to class path.   Mar 11, 2015 3:59:36 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@1d8c528: startup date [Wed Mar 11 15:59:36 IST 2015]; root […]

spring javaconfig example – @Configuration

In this tutorial we are going to explore how we can achieve to build a completely XML-free sample Spring  application. Before Spring 3.0  we are using XML based approach to configure our beans in xml file. But in Spring 3.0 we have new feature “@Configuration”  which is useful to configure our beans in programmatically. let us have […]

When we use interface and abstract class in java

In this tutorial we will learn “when we use interface and abstract class in java” and what is the significance of interface and abstract class The question “when we use interface and abstract class in java ? ” is very common in lot of  java interviews , let us have a look. To answer the above question, we […]

what is difference between abstract class and interface in java

In this tutorial we will learn what is the significance of  Abstract class and Interface  and what is the  difference between abstract class and interface in java. In java basically to implement/achieve the one of powerful feature “abstraction” we need use either Abstract class and Interface, both have abstract methods. There are some cases when […]

Print occurrence of integer in java

Solution: There will be many ways to solve this problem, but here we are giving two solutions to print occurrence of integer 1) Printing occurrence of integer using Collections.freequence() method 2) Printing occurrence of integer using HashMap

Output