Shriansh Kumar has Published 173 Articles

Sort an Array of Triplet using Java Comparable and Comparator

Shriansh Kumar

Shriansh Kumar

Updated on 15-May-2023 17:12:15

164 Views

Array is a linear data structure that is used to store group of elements with similar datatypes. It stores data in a sequential manner. Once we create an array we can’t change its size i.e. it is of fixed length. In this article, we will create an array of triplet ... Read More

Sort Java Vector in Descending Order using Comparator

Shriansh Kumar

Shriansh Kumar

Updated on 15-May-2023 17:08:52

309 Views

Vectors implement the List interface and are used to create dynamic arrays. The array whose size is not fixed and can grow as per our needs is called as a dynamic array. The Comparator is an interface available in ‘java.util’ package. Sorting means rearranging the elements of a given list ... Read More

Runtime Type Identification in Java

Shriansh Kumar

Shriansh Kumar

Updated on 15-May-2023 16:56:42

535 Views

Runtime Type Identification in short RTTI is a feature that enables retrieval of the type of an object during run time. It is very crucial for polymorphism as in this oops functionality we have to determine which method will get executed. We can also implement it for primitive datatypes like ... Read More

Sort LinkedHashMap by values using Comparable Interface in Java

Shriansh Kumar

Shriansh Kumar

Updated on 15-May-2023 16:53:12

262 Views

LinkedHashMap is a generic class that is used to implement Map Interface. Also, it is a sub class of the HashMap class therefore, it can use all the methods and also perform similar operations that a HashMap class is capable of. Java provides various ways to sort LinkedHashMap, we ... Read More

Sort LinkedHashMap by Keys in Java

Shriansh Kumar

Shriansh Kumar

Updated on 15-May-2023 16:49:47

707 Views

LinkedHashMap is a generic class that is used to implement Map Interface. Also, it is a sub class of the HashMap class therefore, it can use all the methods and also perform similar operations that a HashMap class is capable of. Java provides various ways to sort LinkedHashMap, we ... Read More

Runtime JAR File in Java

Shriansh Kumar

Shriansh Kumar

Updated on 15-May-2023 16:48:29

539 Views

The full form of JAR is Java Archive File. Java provides this feature to bundle multiple java program files as well as their corresponding class files into one single unit. Perhaps, it is the only file format that can store audio, video, text files and so forth in one place. ... Read More

Program to Convert Byte Array to Writer in Java

Shriansh Kumar

Shriansh Kumar

Updated on 15-May-2023 16:45:00

212 Views

Byte Array can be said as the combination of byte and array. Byte is the smallest integer type and Array is a linear data structure that is used to store groups of elements of similar datatypes. This article will discuss a program to convert Byte Array to Writer in Java. ... Read More

Rounding off errors in Java

Shriansh Kumar

Shriansh Kumar

Updated on 15-May-2023 16:42:51

609 Views

While writing codes we all do various mistakes that lead us to errors like overflow errors and syntax errors. Rounding-off error is one of the common errors that may result in a wrong solution for a given mathematical problem. Generally, this error occurs when we work with floating point numbers. ... Read More

Rules For Variable Declaration in Java

Shriansh Kumar

Shriansh Kumar

Updated on 12-May-2023 17:52:12

849 Views

In any programming language, variables serve as a container that is used to store values. Before actually using a variable we need to declare it first. We can’t give any random names or symbols to it, although Java provides almost all the letters and symbols available for human and machine ... Read More

Student Grade Calculator using Java Swing

Shriansh Kumar

Shriansh Kumar

Updated on 12-May-2023 17:47:24

1K+ Views

Swing is a framework of Java that is used to develop window based applications. It provides a rich variety of GUI (Graphical User Interface) components that are lightweight and platform independent. Some of the classes of GUI components are JLable, JButton, JFrame, JCheckBox and so forth. In this article, we ... Read More

Advertisements