Teja Kolloju has Published 13 Articles

Difference between Exception and Error in Java

Teja Kolloju

Teja Kolloju

Updated on 15-Apr-2025 19:11:02

24K+ Views

In this article, we will compare the Java Error class and the Java Exception class. Both exceptions and errors are subclasses of the Throwable class. The error indicates a problem that mainly occurs due to the lack of system resources and our application should not catch these types of problems.  ... Read More

Difference between Concurrent hash map and Synchronized hashmap in Java

Teja Kolloju

Teja Kolloju

Updated on 15-Apr-2025 19:10:46

8K+ Views

A Map is an object that stores key-value pairs, where each key is unique but values can repeat. The HashMap is a type of Map that uses a hashtable in order to store these pairs. Now we will discuss the differences between ConcurrentHashMap and Synchronized Hashmap. What is a ConcurrentHashMap? ... Read More

Difference between Comparable and Comparator in Java

Teja Kolloju

Teja Kolloju

Updated on 15-Apr-2025 19:09:18

5K+ Views

Comparable and Comparator both are an interface that can be used to sort the elements of the collection. Comparator interface belongs to java.util package while comparable belongs to java.lang package. Comparator interface sort collection using two objects provided to it, whereas comparable interface compares" this" refers to the one objects ... Read More

Advertisements