Importance of hashCode() and equals() methods

While we are working with objects in collection framework, we need to consider the followings: Set doesn’t allow duplicate value. Map uses the key object which can’t duplicate Set uses object’s hashCode() and equals() method to identify whether the object already exists in Set. And Map uses these methods to determine the index to put…

Read more

To restrict a java class from creating multiple objects

To restrict a java class from creating multiple objects We can restrict our java class for creating specified number of objects of it and it’s very easy. Before going to this topic I want to share some knowledge on singleton class. A singleton class is a class which always returns a single object at any…

Read more

Create a JMS client using CCDT URL

Create a JMS client using CCDT URL In my on job learning I have leant and written a java code to establish a connectivity using CCDT(Client Channel Definition Table) url. I just share my real time experience with you. It may help you to resolve your problems. Before going to give the example let me…

Read more

Convert image to String and String to image

Convert image to String and String to image I am working in a project where I implemented a module which can convert an image to string and vice versa. So I just thought to post it here. Here I am using apache commons codec API (apache commons codec 1.8.jar ). You can download it from…

Read more

Create JMS Client for IBM MQ with example

Create JMS Client for IBM MQ with example Before going to the example let me tell you about JMS. JMS stands for Java Message Service API that allows java application to communicate with any messaging implementation by sending, and consuming messages. Also you can create a message using this API. I am giving an example…

Read more
Back to top af_ZA