Question: In JAVA, 1/Write a static method named containDigit that accepts two integer parameters a, and b. Assume that a is a positive integer (>0) and

In JAVA,

1/Write a static method named containDigit that accepts two integer parameters a, and b.

Assume that a is a positive integer (>0) and b is single-digit numbers from 0-9 inclusive.

Your method should return;

true if a contains b at among its digits, and

false otherwise.

2/ Write a method called gcd that accepts two random integers in the range of [32,256] as parameters and returns the greatest common divisor (GCD) of the two numbers (by using of while loop).

thank you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!