Question: Write a public Java class called MultiplyDigits which has a public method called calculate that returns the product of all digits of the input number.
Write a public Java class called MultiplyDigits which has a public method called calculate that returns the product of all digits of the input number. For example, if the number is 259, then the product returned will be 2*5*9 = 90. Test your method by calling it in the main method with 742 as the input number.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
