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 Integers, Doubles and other datatypes. In this article, we will explain the use case of Runtime Type Identification in Java with the help of examples. Program for Runtime Type Identification Let’s discuss a few methods that can help us to identify type of object: instanceOf It is a ... Read More
An array is a data structure consisting of a collection of elements of same data type, and each element is identified by an index. [2, 4, 0, 5, 8] 0 1 2 3 4 The integers 2, 4, 0, 5, 8 are the array elements and 0, 1, 2, 3, 4 are the respective index values of the array elements. In The article below, we will discuss the python program to find common elements between two arrays. Input Output Scenarios Assuming we have two arrays A and B. And the resultant ... Read More
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 will learn how to create and sort it by its values using Comparable Interface through this article. Program to sort LinkedHashMap by Values Before jumping to the sorting program directly, let’s take a look at few concepts first − LinkedHashMap As we have discussed earlier the LinkedHashMap class extends ... Read More
A matrix is a rectangular array where the set of numbers arranged in rows and columns. And it is called as an m X n matrix where m and n are the dimensions. If a matrix contains a very less number of non-zero elements compared to the zero elements then it is called a sparse matrix. [0, 0, 3, 0, 0] [0, 1, 0, 0, 6] [1, 0, 0, 9, 0] [0, 0, 2, 0, 0] The above matrix is 4X5 matrix here most of the numbers are zero. Only a few elements are non-zero so that we can ... Read More
A matrix is a two-dimensional array of many numbers arranged in rows and columns. A square matrix (whose rows and columns has same number of elements) has two diagonals. One is the Primary diagonal - located from the top left corner to the bottom right corner of a square matrix. And the second one is the Secondary diagonal - located from the top right to the bottom left corner. For a square matrix if all the elements below the Primary diagonal are zero then it is called the Upper Triangular Matrix. [1, 3, 4] [0, 5, 6] [0, ... Read More
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 will learn how to create and sort it by using its keys through this article. Program to sort LinkedHashMap by Keys Before jumping to the sorting program directly, let’s take a look at few concepts first − LinkedHashMap As we have discussed earlier the LinkedHashMap class extends HashMap class ... Read More
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. In this article, we will discuss how we can create and access a JAR file in Java. Java JAR File The need for data compression was felt to store and transmit large amounts of data without any hassle. For this purpose, a ZIP file was introduced that encouraged Java creators ... Read More
Introduction The British government passed the Indian Council Acts in 1861, 1892, and 1909, which were significant pieces of legislation for the administration of British India. These actions had a big impact on the political landscape of India and how the British government interacted with the Indian population. In this article we will tell you about What are differences and Similarities between the Indian Council Act [1861, 1892, 1909]? These laws all had different clauses and goals, but they also had some things in common. What Was the Indian Councils Act 1861? The Indian Councils Act 1861 was an ... Read More
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. Let’s understand the term Byte Array and Writer first. Byte Array and Writer Class Byte Array It is a type of array that stores a sequence of data of byte datatype. We will use the ‘getBytes()’ method to convert specified strings into sequences of characters and store them in a ... Read More
Introduction Union of states: The constitution of India Defines the structure of Indian Federal system and its key specialties as Union of States. This is why, in Indian competitive examinations, “The Union of states” is a very important topic for candidates. In this article, we are going to inform and educate you almost everything about Union of states such as Meaning of Union of States, Constitutional Provisions related to Union of States & why India is Union of States. So, let’s start- What is Meaning of Union of States? To understanding it in a smooth way, the Union of States ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP