Category Archives: Java Programs

Threads in java are the lightweight sub-processes that can be created by the user. It is used to perform complicated tasks in the background without… Read More
Package in Java is a mechanism to encapsulate a group of classes, sub-packages and interfaces. All we need to do is put related classes into… Read More
Problem Statement: Given a String extract the substring enclosed in single quotes (‘) using Java Regex.  Java regex is an API for pattern matching with… Read More
A Patricia Trie or prefix Tree or radix Tree is an ordered structured tree, which takes the applications of usually the data it stores. A… Read More
ConcurrentLinkedDeque class in Java is an unbounded concurrent deque that stores its elements as linked nodes where each node contains the address of the previous… Read More
The java.lang.ClassCastException is one of the unchecked exception in Java. It can occur in our program when we tried to convert an object of one class type into… Read More
A LinkedList is a linear data structure, in which the elements are not stored at contiguous memory locations. For converting a linked list to a… Read More
The Java.util.LinkedList.removeFirst() method is used to remove the first element from the LinkedList.  The Java.util.LinkedList.removeLast() method is used to remove the last element from the… Read More
A PriorityQueue is a linear data structure in which the elements are ordered according to their natural ordering or by some custom comparator provided at… Read More
TreeMap is a part of the Java Collections framework. Java TreeMap contains values based on the key. It implements the NavigableMap interface and extends AbstractMap… Read More
Cryptography using the Transposition Technique can be done by using Transposition ciphers which uses the letters of the plaintext message and after that, they permute… Read More
Java Byte streams are used to perform input and output of 8-bit bytes. To write Bytes using BytesStream to a file Java provides a specialized… Read More
ArrayBlockingQueue class is a member of the Java Collection framework. ArrayBlockingQueue is a bounded blocking queue. The term bounded, means that the size of the… Read More
The enumeration in java is one of the predefined interfaces, whose object is used for retrieving the data from collections framework variable(like Stack, Vector, HashTable,… Read More which is a common exception which occurs while we try to access a file. FileNotFoundExcetion is thrown by constructors RandomAccessFile, FileInputStream, and FileOutputStream. FileNotFoundException… Read More