- 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)
6K+ 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 count of positive numbers, negative numbers and zero present in the given array. Any number which is greater than zero that is called as positive number, if the number is less than zero then that is negative number else the given number is a zero. Let’s see how we can do it by using Java programming language. To Show You Some Instances Instance-1 Suppose the original array is {2, 0, -1, 4, -6} In the ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
17K+ 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 the elements which are repeating in an array 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. 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 {2, 3, 5, 4, 3, 1, 3, 2, 1, 2, ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
68 Views
A circle is a round shape two-dimensional diagram which has no corners. Every circle has an origin point and every point on the circle maintains equal distance from the origin. The distance between the origin and a point in a circle is known as Radius of the circle. And similarly, if we draw a line from one edge to another edge of the circle and the origin is held in the middle of it, that line is known as diameter of the circle. Basically, the diameter is double of the length of the radius. Chord of the circle refers to ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
83 Views
A circle is a round shape two-dimensional diagram that has no corners. Every circle has an origin point and every point on the circle maintains an equal distance from the origin. The distance between the origin and a point in a circle is known as the Radius of the circle. And similarly, if we draw a line from one edge to another edge of the circle and the origin is held in the middle of it, that line is known as the diameter of the circle. Basically, the diameter is double of the length of the radius. The chord of ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
137 Views
A circle is a round shape two-dimensional diagram which has no corners. Every circle has an origin point and every point on the circle maintains equal distance from the origin. The distance between the origin and a point in a circle is known as Radius of the circle. And similarly, if we draw a line from one edge to another edge of the circle and the origin is held in the middle of it, that line is known as diameter of the circle. Basically, the diameter is double of the length of the radius. Arc of the circle refers to ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
5K+ Views
String is a sequence of character values. In Java, Strings are considered as objects. We have a String class provided by Java for creating and manipulating strings. We have to convert the first letter of the word to lowercase and last letter of the word to uppercase. In this article we will see how the first and last letter can be converted into lower and upper case respectively. Let’s explore. To Show You Some Instances Instance-1 Suppose the input string is “Hello” After converting the first letter to lower and last letter to capital, the new string will be “hellO” ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
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 sum of elements which is even and sum of elements which is odd in an array and compare their sum and check which one is smaller. 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. ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
412 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 sum of all even and odd numbers in a given array and compare them to see which one is greater. 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 {14, 49, 55, 67, 72, 82} After finding average of sum of even and ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
2K+ 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 check and confirm the array is free from 0 and negative numbers. Let us say that an array contains 0 or a negative element then the result should pop up that "Array contains 0 or a negative number." Otherwise, the result should be "Array doesn’t contain 0 or a negative number." Note − The array must be an integer array. Let’s explore the article to see how it can be done by using ... Read More
![Mr. Satyabrata](https://www.tutorialspoint.com/assets/profiles/526132/profile/60_3653035-1664258182.jpeg)
770 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 arrange all elements of array such that negative elements are present before positive elements. If a number is greater than 0 then it is called as positive number, if less than 0 then it is called as negative 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 ... Read More