- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 9321 Articles for Object Oriented Programming
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
3K+ Views
Matrices are nothing but a collection of data elements arranged in a rectangular layout that is two-dimensional. In Java, an array with two dimensions can be considered as a matrix. As per the problem statement the task is to check if the matrix is a magic square or not. A matrix is said to be a magic square if the sum of elements of any row, column or diagonal is equal to a specific number. Let’s deep dive into this article, to know how it can be done by using Java programming language. To show you some instances Instance-1 Suppose ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
168 Views
Matrices are nothing but a collection of data elements arranged in a rectangular layout that is two-dimensional. In Java, an array with two dimensions can be considered as a matrix. Involutory matrix is a square matrix which when multiplied by itself, gives back an identity matrix. Identity matrix is a matrix in which all elements are zero except the diagonals which are one. Let’s deep dive into this article, to know how it can be done by using Java programming language. To show you some instances Instance-1 Suppose we have a matrix | 1 0 ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
1K+ Views
Matrices are nothing but it’s more than a collection of data elements arranged in a rectangular layout that is two-dimensional. In Java, an array with two dimensions can be considered as a matrix. A square matrix is called a Markov matrix if all entries are nonnegative and the sum of each column vector is equal to 1. The Markov matrix represents steps in a Markov chain. Each input of the Markov matrix represents the probability of an outcome. Let’s deep dive into this article, to know how it can be done by using Java programming language. To show you some ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
994 Views
Matrices are nothing but it’s more than a collection of data elements arranged in a rectangular layout that is two-dimensional. In Java, an array with two dimensions can be considered as a matrix. Identity matrix is a square matrix which has all 1s as its principal diagonal elements and rest are 0s. As per the problem statement we have to0 check if the given matrix is Identity matrix or not. Let’s deep dive into this article, to know how it can be done by using Java programming language. To show you some instances Instance-1 Suppose we have a matrix ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
3K+ Views
Two elements giving the maximum sum in an array means, we have to find two largest array elements which will eventually give the maximum sum possible. In this article we will see how we can find the maximum sum of two elements in Java. To show you some instances Instance-1 Suppose we have the below array [10, 2, 3, -5, 99, 12, 0, -1] In this array the largest element is 99 and second largest is 12. Max sum = 99 + 12 Hence the maximum sum of two elements in this array is 111. Instance-2 Suppose we have the ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
959 Views
Two elements giving the maximum product in an array means, we have to find two largest array elements which will eventually give the maximum product possible. In this article we will see how we can find the maximum product of two elements in Java. To show you some instances Instance-1 Suppose we have the below array [10, 2, 3, -5, 99, 12, 0, -1] In this array the largest element is 99 and second largest is 12. Max product = 99 * 12 Hence the maximum product of two elements in this array is 1188. Instance-2 Suppose we have the ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
461 Views
In Java, Array is an object. It is a non-primitive data type which stores values of similar data type. The matrix in java is nothing but a multi-dimensional array which represents multiple rows and columns. Scalar multiplication is nothing but multiplication between a matrix and a real number. The result of this multiplication is in matrix format. As per the problem statement, we have to find the scalar multiplication of a matrix. Let’s deep dive into this article, to know how it can be done by using Java programming language. To show you some instances Instance-1 Suppose the original matrix ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
616 Views
As per the problem statement, we have given an array with some random integer values and we have to find out and print the index which contains any zero or negative values. Note - Take an integer array Let’s deep dive into this article, to know how it can be done by using Java programming language. To show you some instances Instance-1 Given Array= [1, 2, -3, -4, 0, 5] The index contains Zero and negative values = 2, 3, 4 Instance-2 Given Array= [-1, 0, 4, 6, 8, -5] The index contains Zero and negative values = 0, 1, ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
315 Views
An array is a linear data structure in which elements are stored in contiguous memory locations. As per the problem statement, we have given an array with some random integer values and we have to find out the numbers which are greater than its all left elements by using Java programming language. Let’s start! To show you some instances Instance-1 Given Array= [1, 2, -3, -4, 0, 5]. The numbers which are greater than its all left elements = 2, 5 Instance-2 Given Array= [-1, 0, 4, 6, 8, -5]. The numbers which are greater than its all left ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
894 Views
As per the problem statement, we have an array with some random integer values and we need to find out the numbers which are greater than its immediate left element. Note - Take an integer array. Let’s deep dive into this article, to know how it can be done by using Java programming language. To show you some instances Instance-1 Given Array= [1, 2, -3, -4, 0, 5]. The numbers which are greater than its left element = 2, 0, 5 Instance-2 Given Array= [-1, 0, 4, 6, 8, -5]. The numbers which are greater than its left element = ... Read More