Featured
-
How to split a String
Below I have written a code to split a string.
by shahbaz.ahmmod -
Send Push Notification with Custom Data to iPhone device from Java Server Side
This blog will help you to send Push Notifications
by babita.dhami -
Tomcat and Eclipse Integration Error : “Unknown version of Tomcat was specified”
If you are adding Server in Eclipse for Tomcat, an
by chandan.ahluwalia -
Spring MVC and MongoDB
Repository Class Using MongoDB : Spring has th
by sumit.vyas -
How to create DLL file from java?
Hello Guy's This Blog will guide how to create D
by bhagwan.khichar
Tags
How to Find Perfect Java Development Company For Your Project?
Java is a popular language for building websites and applications, it is widely used across the world. From custom software solutions to web development, Java is used everywhere. There are countless Java consulting companies in different parts of...
Executing Stored Procedure using Spring JDBC Template
Technology: Spring-jdbc is the abstraction framework, it take care the below following list:
1) Defining connection parameters
2) Open Connection
3) Specify the statement
4) Prepare and execute statement/prepared statement
...
What is Containerization in Java?
Running software in containers is gaining in popularity for developers. Containers are typically collections of pieces of software and environment, running together in a single system. Developers take these systems and test them in the form of co...
Top Benefits of Java Application Development For Business Enterprises
Java applications are not unknown to the world and it has completely transformed the way how business enterprises interact with their potential customers. Java Apps are quite user-friendly and interesting to use. Further, the amazing user interfa...
Kotlin Vs Java: Which is Better for Android App Development?
For a while now, the battle between Kotlin and Java in a bid to determine with the Best Android Development Services for mobile phones has continued though it is about to come to a halt now. While Java has been around for longer, Kotlin is relati...
List of Top 5 Vital Development Tools For Java Developers
Java is a widely used programming language in the software development industry. There is an immense number of tools used by Java developers to make the development process faster and efficient. Developers first analyze the project and as per the...
Java and Its Role in Shaping Big Data and IoTs Future
Data is, beyond question, among the most pivotal factors when it comes to running a successful business. This rising popularity of the potential of data has served as the gateway to the adoption of Big Data. While it throws open the window to use...
Top 7 New Tools that Every Java Developer Should Know Today
Platform independence! It’s one the major reasons of the ever popularity of the Java language. It’s no wonder that organizations of all sizes and types are integrating it into their processes, not to mention the fact that Android is r...
JAVA Web Frameworks Spring MVC, JSF, Grails, Struts 2, GWT - Pros and Cons
Undoubtedly Java is the most demanded programming languages in the world today. A JS framework provides a solid foundation on which a programmer can build programs. It includes predefined classes and functions that are used to manag...
Java 8 Vs Java 9 : Comparing the Enhanced Features of Interface
Java 8 came with the enhanced functionality to the Interfaces. Prior to Java 8, interfaces were contracted only with the abstract methods and subclass was obliged to implement the contract. Child class has to implement the abstract ...
Java - How to Fix or Avoid Incompatible Types Possible Lossy Conversion Error?
In this blog, we will see why we get an error while we perform any arithmetic operations on two operands with type byte or short. we find the following error while compiling the source code in Java.
In the case of type short: Let say we add tw...
How to Use Javadoc tool to create documentation API
Creating a documentation of a Java source file is not a big task, it can be done in just 3 steps which are explained below.
We use Javadoc tool to create documentation API for a java source file. Let's create a file with class name Documen...
Different ways of writing main method in Java
Here we will learn different ways in which we can write the main method in JAVA. Different ways of modifying the main method in JAVA are mentioned below and displayed with the help of example:
1) Making changes in the sequence of modifiers, me...
How to Add Elements, Increase Size & Capacity of a Vector Class in JAVA Collection Framework
In this blog we will understand about Vector Class in Collection Framework. We use vector class to facilitate the growable nature of collection of objects. Like array we can access any member of the collection using the integer index. The size of...
Instantiating and Manipulating LinkedList in Java with Examples
Introduction:
In this blog we will learn about LinkedList.In general terms, LinkedList is a data structure where each element consist of three parts. First part represents the link to the previous element, second part r...
List of 40+ Best Tutorial Sites to Learn JAVA for Beginners in 2019
Hello Geeks,
I'm an experienced JAVA developer and during the course of my learning from the early stage as a fresh web developer, I have learned web development technologies from many online tutorial sites. And as and when ...
How to iterate over elements of ArrayList in java
In this blog we will learn how to iterate over the elements of a collection (here we considered ArrayList) using generics and without generics.
First we will go through the process of using iterator method. Iterator() method is included by eve...
Instantiating and Manipulating ArrayList in Java
In this blog we will learn about ArrayList. ArrayList is one of the collection class of collection framework. It is a way of storing elements dynamically in an array. It implements the List interface and extends the AbstractList class. Important ...
Collection Framework and Interface in Java
In java “Collections” helps us to store and manipulate the collection of objects. All the operations such as manipulation, deletion, searching, sorting, insertion can be performed quickly with the help of “Collections”. Ja...
Thread and instantiating thread in java
In this blog we will learn about importance of Thread class in java and instantiating thread. Every java program consists at least one thread i.e. the main thread. The Java Virtual Machine always creates a main thread and calls the main method in...
Array and it's type in java
In this blog we will learn about array and it's type in Java. Array is defined as a collection of similar type of elements.
Array are seen as a collection of elements these elements belongs ...
Generate Simple PDF using iText
Generate Simple PDF using iText: Some time we need to generate documents using our application. The document could be like pdf, word, excel etc. To generate these documents we need to take help of third party api.
In this article we talk about...
What is singleton pattern and double checked locking ?
Singleton pattern is basically used to maintain only a single object of a class in the application. This uses private constructor and static method to return class instance like this :
public class SingleTon {
private static Singl...
What is Abstract factory pattern with example?
We know that factory pattern provides single level abstraction and used to create object easily but in a case of more security, we can use one more level of abstraction by using the abstract factory pattern. we can say that this provides factory ...
What is Factory Pattern?
Factory pattern is one of the most used design patterns in java with the help of this pattern you can create object easily by using this concept of oops.
Example of Factory pattern :
1. Create an interface
2. Create class that 'll ov...
Arraylist vs Vector
Basic difference between the two is the Synchronization. Vector is Synchronized and Arraylist is not. If your application will be having single thread of execution use Arraylist else Vector.
ArrayList is fast because its not synchronized...
Integrate Apache2 and Tomcat 7 Using mod_jk
As we know our most of the projects in Java is run using Tomacat application server. Sometimes we also need some web server like apache2 for other functionalities like wordpress integration.
In such situation our project need both of the server ...
Multiple Inheritance in Java with Example
Hello!!
As we know that java does not support the multiple inheritance but java 8 provides a way by which we can use multiple inheritance. It provides a default method to do this job.
In java 7, interface are used to declare the contra...
How to read a text file using Scanner in Java?
Hello!!
As we know that their are multiple way to read the text file in java. BufferedReader class is generally uses to read the text file. FileReader, BufferedReader, FileInputStream is used to reade the text file in java ...
Regular Expression in Java
Hello!!
Regular Expression is part of the Automata, and also called rational expression. We use it for finding the match of the string like validating the Email address, Password etc. It uses some special sequence of the character for mat...
Travelling Salesman Problem
Hello!!!
Travelling Salesman Problem is for finding the shortest possible root that visit every node in the graph and return to the origin point. It is used to find the shortest path.
For example:-
In this graph, Their is many way to rea...
How to Print All Leaf Node of Binary Tree
Hello Everyone!!!
In order to solve binary tree problem of leaf node, we should know that what is leaf node? Leaf node is node of the binary tree whose have no left and right child means whose left and right child is null. It...
Concatenate two arrays in Java
Concatenate two arrays in Java is quite simple you can use single liner solution from the Apache Commons Lang library.
ArrayUtils.addAll(T[], T...)
For example if you have two array firstArray and secondArray, you would have code ...
java.io.FileNotFoundException: the system cannot find the file specified
If you face following error: "java.io.FileNotFoundException: the system cannot find the file specified" and error similar to below is visible in logs:
Exception in thread "main" java.io.FileNotFoundException: Report.PDF (The s...
How to make https to Dropbox Redirect URL
Hello Guys,
As Dropbox was not allowing HTTP URL's for callback or redirect URL's (as http was only allowed for localhost).
I added below redirect URI in dropbox App for local machine :
http://localhost:8080/DropboxTest/oauth_c...
Use of stream instead of for loop in java 8
We all know about the use of For loop and for each loop that is used to iterate all elements in list or collection but some time in case of n numbers of items loop traverse till nth item that is time consuming but after java 8 we have some strong...
Default methods and static methods uses in Interface.
We know that interface provide methods without body or functionality but in abstract class we can provide default functionality of methods. So in interface we can't give method body and can't declare ant static method.
But in Java 8 no...
Tower of Hanoi Implementation in Java
Hi Readers,
In this blog i will provide you the Java solution for the famous Tower of Hanoi problem using Stack.
Problem definition
Tower of Hanoi is a mathematical puzzle. It is also known as Tower of Brahma or Locus' Tower. Th...
Insertion sort implementation in Java
Hi Readers,
This blog is to help you to understand how insertion sort works. Insertion sort is a simple sorting algorithm which is good to sort short list.
Real life example of insertion sort is sorting of playing cards, Like we pick a card...
Fisher-Yates Algorithm for Array Shuffling
Hi there,
Here in this blog I am going to provide Java implementation of Fisher-Yates Algorithm for array shuffling. Fisher–Yates shuffle algorithm as named after Ronald Fisher and Frank Yates. It is also known as Knuth sh...
Taking a screenshot of screen using Java and save it in image format
Hello there,
In this blog I will provide a solution to how you can get screenshot of your screen and then save it at any location of your choice for this, we will use java.awt.Robot for creating an image which will generated by readi...
Adding watermark to your PDF using Java
Hi there,
In this blog we will see how to add watermark images to our PDF files using Java. Watermarks have been used to discourage counterfeiting. To generate watermarked PDFs we need an additional itext.jar file to be in...
Getting OS-level system information using Java
Hello readers,
Here below is a small Java program to extract information such as the current disk space used, CPU utilisation and memory used in the underlying OS. To get information related to the disk usage you can also use java.io.File clas...
Read CSV data using Java
Hello
In this blog I will give a demo about how to read CSV data from a file. For this purpose I will use Opencsv library. Opencsv is a very simple csv (comma-separated values) parser library for Java.
You can download the binar...
Counting Sort
Hi,
This blog is to help you to understand counting sort in easiest manner, counting sort can sort the range in linear time but we have to provide the starting element and last highest element of the range (means elements in the rang...
PDF generation using Apache FOP
Hello readers,
This blog is to help you to learn how to generate PDF using Apache's FOP in Java. Apache FOP ( Formatting Object Processor ) which uses XSL-FO to create PDF file of our document.
Here is a s...
Sorting JSONArray in java
Hello Guys
Here, I am writing the code for sorting JSONArray in java technology.
we can sort jsonarray in ascending or in descending order according to our requirement by changing pattern as below.
private stat...
Sieve of Eratosthenes
Hello,
This blog is to help you to understand Sieve of Eratosthenes algorithm for prime number generation in easiest way. This algorithm is to calculate the prime number up to a limit with lesser time complexity, but it takes O(n) extra s...
Comparator Interface in Java
Comparator:- Comparator interface found in java.util package and it contains equals() and compare() method. It use the multiple sorting technique to write our own comparison logic and is used to sort the e...
Interesting fact about AND and OR operator
Hello readers,
I want to share an interesting fact about AND and OR operator, which you might not had encountered. As we know that in AND operator the result is only true when the values of the operands are true, if any of the opera...