
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 7442 Articles for Java

1K+ Views
In Java, Array is an object. It is a non-primitive data type which stores values of similar data type. As per the problem statement we have to find the array elements which are present in the odd position in an array and print them. A number is said to be even if it is divisible by 2 else it is called an odd number. Note − The array must be an integer array. Let’s explore the article to see how it can be done by using Java programming language. To Show You Some Instances Instance-1 Suppose the original array is ... Read More

3K+ Views
In Java, Array is an object. It is a non-primitive data type which stores values of similar data type. As per the problem statement we have to find the array elements which are present in the even position in an array and print them. A number is said to be even if it is divisible by 2 else it is called an odd number. Let’s explore the article to see how it can be done by using Java programming language. To Show You Some Instances Instance-1 Suppose the original array is {12, 5, 77, 14, 91, 21, 1, 50} ... Read More

21K+ Views
In Java, Array is a non-primitive data type which stores values of similar data type. As per the problem statement we have to detect which element is repeated maximum times in an array for maximum number of times and print its frequency. An array can contain duplicate values as well. So, the number of times an element is present in an array, that is called frequency of the element in the array. And the element whose frequency is more that is the most frequent element in the array. Let’s see how we can do it by using the Java programming ... Read More

7K+ Views
In Java, Array is an object. It is a non-primitive data type which stores values of similar data type. As per the problem statement we have to find the union of two arrays. Union refers to joining together whereas union of arrays refers to the new array combining all unique elements from the input arrays. Let’s explore the article to see how it can be done by using Java programming language. To Show You Some Instances Instance-1 Suppose the first array is {0, 3, 5, 6, 9, 1}. And the second array is {1, 2, 6, 10, 8, 7}. ... Read More

14K+ Views
In Java, Array is an object. It is a non-primitive data type which stores values of similar data type. As per the problem statement we have to find the element which is present in the middle of the array. If the array contains odd number of elements, then you will get one element present at the exact middle of the array. If the array contains even number of elements, then you will get two elements present at the middle of the array. In this article, you will see how to get the middle element of an array by using Java ... Read More

3K+ Views
In Java, Array is an object. It is a non-primitive data type which stores values of similar data type. As per the problem statement we have to find the largest palindrome in an array. A number is said to be a palindrome number if after reversing the same number it is equal to the original number. Let’s explore the article to see how it can be done by using Java programming language. To Show You Some Instances Instance-1 Suppose the original array is {857, 232, 1996991, 54545} After finding the largest palindrome of an array the result will be ... Read More

561 Views
In Java, Array is a non-primitive data type which stores values of similar data type. As per the problem statement we have to find the frequency of each element i.e how many times each element is occurring in an array. Let’s see how we can do it by using the Java programming language. To Show You Some Instances Instance-1 Suppose the original array is {21, 10, 26, 21, 10, 33, 33, 20, 10, 21} After finding the frequency of each element of an array the result will be − Element | Frequency ------------------------ 21 | 3 10 | 3 ... Read More

1K+ Views
In Java, Array is an object. It is a non-primitive data type which stores values of similar data type. As per the problem statement we have to find an index such that the sum of elements at lower indexes is equal to the sum of elements at higher indexes and hence that is called the equilibrium index of an array. In this article, you will see how to get the equilibrium index of an array by using Java programming language. Let’s explore. To Show You Some Instances Instance-1 Suppose the original array is {-4, 6, 2, 1, -7, 5, 3 ... Read More

5K+ Views
In Java, Array is an object. It is a non-primitive data type which stores values of similar data types. As per the problem statement we have to find a cumulative sum array which means array elements will be updated with the sum of the current element and all previous elements. To find the cumulative sum, the array must contain all numeric values. In this article, you will see how to find the cumulative sum of an array by using Java programming language. Let’s explore. To Show You Some Instances Instance-1 Suppose the original array is {2, 9, 3, 5, 1, ... Read More

4K+ Views
In Java, Array is an object. It is a non-primitive data type which stores values of similar data type. As per the problem statement we have to find leaders in an array. An element is a leader if it is greater than all the elements to its right side. Let’s start! To Show You Some Instances Instance-1 Suppose the original array is {16, 17, 4, 3, 11, 14, 23, 2, 6, 10}. After finding leaders in an array the result will be − 23 10 Instance-2 Suppose the original array is {16, 17, 4, 3, 5, 6, 9, 1, ... Read More