Found 9150 Articles for Object Oriented Programming

Find Angle at Circumference from Angle at Centre by a Chord in Java?

Mr. Satyabrata
Updated on 05-Jan-2023 12:24:23

109 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

Find Angle while Angle by similar Chord at center in Java

Mr. Satyabrata
Updated on 05-Jan-2023 12:33:22

144 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

Find Angle at Centre from Angle at Circumference by an Arc in Java?

Mr. Satyabrata
Updated on 05-Jan-2023 12:10:40

221 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

Capitalize last letter and Lowercase first letter of a word in Java

Mr. Satyabrata
Updated on 05-Jan-2023 11:56:58

7K+ 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

Find if sum of odd or even array elements are smaller in Java

Mr. Satyabrata
Updated on 05-Jan-2023 11:51:05

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

Check Average of Odd Elements or Even Elements are Greater in Java

Mr. Satyabrata
Updated on 05-Jan-2023 11:45:21

643 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

Check if Array is Free From 0 and Negative Number in Java

Mr. Satyabrata
Updated on 05-Jan-2023 11:39:58

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

Arrange Negative Array Elements Before Positive Elements in Java

Mr. Satyabrata
Updated on 05-Jan-2023 11:33:51

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 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

How To Check Whether a Number is Tech Number or Not in Java?

Mr. Satyabrata
Updated on 09-Dec-2022 10:27:19

8K+ Views

A number is said to be a tech number, when an even digit number is divided into exactly two parts and the square value of the sum of those two numbers is equal to the original number. For more clarification, we take a number which has even digits. After that, divide it into two parts and add two parts. After getting the sum value, we calculate the square of it. Now we compare both the calculated square value and the original/input number. If both are same then we can say that the input number is a tech number otherwise ... Read More

How To Check Whether a Number is Tcefrep Number or Not in Java?

Mr. Satyabrata
Updated on 09-Dec-2022 10:24:06

551 Views

A number is said to be a Tcefrep number, if the reverse of that number is equal to the sum of the proper divisors of the original number. For more clarification, we find the sum of the divisors of a number and find the reverse of the original number. If both the sum value and the reverse of the given number are the same then we can say that the given number is a Tcefrep number. Some examples of Tcefrep numbers are: 6, 498906, 20671542 ... etc. In this article, we will see how to check if a ... Read More

Advertisements