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
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. In this article, we will explore the reason for this problem and try to find a way to get rid of this kind of error. Rounding off Errors Floating Point Types They are also known as real numbers and are used when the calculation requires fractional values. It represents numbers ... Read More
Introduction The Meaning and Significance of India's Citizenship: Indian Citizenship is a very important Topic of Indian Polity. If you are preparing for Competitive exams in India, then you should have to know about The Meaning and Significance of India's Citizenship in detail. We have provided you all the related information about The Meaning and Significance of India's Citizenship with proper details in this article. So, let’s start- The Meaning and Significance of India's Citizenship India's citizenship refers to the legal status of an individual as a citizen of the country, based on the Citizenship Act, 1955. The Constitution of ... Read More
Linear search is the simplest method of searching for an element in an array. It is a sequential searching algorithm that starts from one end and checks every element of the array until the desired element is found. Recursion means a function that calls itself, while using a recusive function we need to use any loop to generate the iterations. The below syntax demonistrates the working of a simple recursion function. def rerecursiveFun(): Statements ... rerecursiveFun() ... rerecursiveFun Linear Search of an Element ... Read More
A matrix is a two-dimensional array of many numbers arranged in rows and columns. And it is called as m X n matrix where m and n are the dimensions. In general, the multiplication of two matrices can be possible only if the number of columns in the first matrix is equal to the number of rows in the second matrix. Input Output Scenarios Assuming we have two input matrices A and B having 3X3 rows and columns. Then the resultant matrix will also have 3 rows and 3 column. [a, b, c] [j, k, l] [(a*j+b*m+c*p), (a*k+b*n+c*q), (a*l+b*o+c*r)] [d, ... Read More