AmitDiwan has Published 11360 Articles

Java Program to Find Sum of Digits of a Number using Recursion

AmitDiwan

AmitDiwan

Updated on 22-Feb-2022 10:26:35

686 Views

In this article, we will understand how to find sum of digits of a number using recursion. A recursive function is a function that calls itself multiple times until a particular condition is satisfied.Recursion is the process of repeating items in a self-similar way. In programming languages, if a program ... Read More

Return True if all entries of two arrays are equal in Numpy

AmitDiwan

AmitDiwan

Updated on 22-Feb-2022 10:13:09

476 Views

To return True if all entries of two arrays are equal, use the ma.allequal() method in Python Numpy. Returns True if the two arrays are equal within the given tolerance, False otherwise. If either array contains NaN, then False is returned.The fill_value sets whether masked values in a or b ... Read More

Java Program to pass lambda expression as a method argument

AmitDiwan

AmitDiwan

Updated on 22-Feb-2022 10:10:53

438 Views

In this article, we will understand how to pass lambda expression as a method argument. A lambda expression is a short block of code which takes in parameters and returns a value.Below is a demonstration of the same −InputSuppose our input is −("Apple", "Orange", "Grapes")OutputThe desired output would be −elppA, ... Read More

Java Program to implement private constructors

AmitDiwan

AmitDiwan

Updated on 22-Feb-2022 10:06:46

193 Views

In this article, we will understand how to implement private constructors. Private constructors allow us to restrict the instantiation of a class.Below is a demonstration of the same −InputSuppose our input is −Run the programOutputThe desired output would be −Private constructor is being called AlgorithmStep 1 - Start Step 2 ... Read More

Java Program to Call One Constructor from another

AmitDiwan

AmitDiwan

Updated on 22-Feb-2022 10:00:43

308 Views

In this article, we will understand how to call one constructor from another. The keyword 'this()' is used to invoke a constructor.Below is a demonstration of the same. We will displaying sum and product of two numbers while using this() −InputSuppose our input is −The numbers are defined as 12 ... Read More

Java Program to calculate the power using recursion

AmitDiwan

AmitDiwan

Updated on 22-Feb-2022 09:57:25

906 Views

In this article, we will understand how to calculate the power using recursion. A recursive function is a function that calls itself multiple times until a particular condition is satisfied.A recursive function is a function that calls itself multiple times until a particular condition is satisfied.Recursion is the process of ... Read More

Java Program to Reverse a Sentence Using Recursion

AmitDiwan

AmitDiwan

Updated on 22-Feb-2022 09:53:19

302 Views

In this article, we will understand how to reverse a sentence using recursion. A recursive function is a function that calls itself multiple times until a particular condition is satisfied.A recursive function is a function that calls itself multiple times until a particular condition is satisfied.Recursion is the process of ... Read More

Clip (limit) the values in an array and place the result in another array in Numpy

AmitDiwan

AmitDiwan

Updated on 22-Feb-2022 09:48:00

251 Views

To clip (limit) the values in an array, use the np.ma.clip() method in Python Numpy. The "out" parameter is where results will be placed in this array. It may be the input array for in-place clipping. out must be of the right shape to hold the output. Its type is ... Read More

Java Program to Find Factorial of a Number Using Recursion

AmitDiwan

AmitDiwan

Updated on 22-Feb-2022 09:43:15

382 Views

In this article, we will understand how to find factorial of a number using recursion. Factorial of a number is the product of itself with each of its lower numbers. Factorial is a function applied to natural numbers greater than zero. The symbol for the factorial function is an exclamation ... Read More

Clip (limit) the values in a Numpy array

AmitDiwan

AmitDiwan

Updated on 22-Feb-2022 09:41:01

699 Views

To clip (limit) the values in an array, use the np.ma.clip() method in Python Numpy. Given an interval, values outside the interval are clipped to the interval edges. For example, if an interval of [0, 1] is specified, values smaller than 0 become 0, and values larger than 1 become ... Read More

Advertisements