Category Java

Java Short Class

Short class in Java is a wrapper class that wraps (converts) a value of primitive data type “short” in an object. In simple words, a Short is a wrapper around a short. An object of Short class contains a single…

Java Byte Class

Byte class in Java is a wrapper class that wraps (converts) a value of primitive data type into an object. In simple words, a Byte is a wrapper around a byte. An object of Byte class contains a single byte…

Private Constructor in Java (with Example)

When a constructor is declared with a private access modifier in a class, it is called private constructor in Java. It is visible within the same class where it has been declared. Private constructor is useful in Java programming when…

Java Number Class

Java Number class hierachy diagram

Number class in Java is an abstract class that is the superclass of Byte, Short, Integer, Long, Float, and Double classes. The Byte, Short, Integer, Long, Float, and Double classes are the most commonly used wrapper classes that represent numeric…

NavigableMap in Java

Java NavigableMap hierarchy diagram

NavigableMap in Java is an interface that is a subinterface of SortedMap interface. It extends SortedMap interface to handle the retrieval of entries based on the closet match to a given key or keys. NavigableMap interface was added by Java…