Categories

Web DevelopmentProgrammingDatabaseWindowsLinuxNetworkingMobile DevicesRaspberry PiPythonCJavaOtherSponsored

JAVA Articles

Program to find the sum of diagonal elements of a 2D array

Java program to calculate the sum of diagonal elements of a 2-D array. Explains how to find the diagonal elements of an array.

How to send email using Javamail with Exchange

How to send emails from a Java program using Javamail API. The sample article demonstrates how to make an authenticated SMTP connection with TLS.

Read and write to files with buffered streams in Java

Reading and writing files in Java using buffered stream classes BufferedInputStream, BufferedOutputStream, BufferedReader and BufferedWriter.

Java program to print N Fibonacci numbers using recursion

Java program to print the first N Fibonacci numbers using the recurssive method. This is a popular question for Java and C programming interviews

Reverse a string using recursion in Java

Java program to reverse a string using recursion method. This is one of the frequently asked question for Java and C programming interviews

Binary search to find the occurrences of an element in a array

Using binary search algorithm to find the first occurrence, last occurrence and the count of an element in a sorted array with duplicate elements.

Implementing Generic Queues in Java using Linked List

How to implement a generic Queue data structure in Java using linked lists. A queue is a linear data structure that manages data using FIFO pattern.

How to read and write Excel files in Java

Here is a Java program that demonstrates how to read and write Excel files using the Apache POI HSSF library

Java program to search an array using binary search algorithm

Explains how binary search works and a Java program to search an array using binary search algorithm.

Sorting collections of user-defined objects in Java

How to sort collections of user defined class objects in Java using Comparable and Comparator interfaces.