Essay
Programming
Write a static method named containsBothDigits that accepts three integer parameters a, b, and c. Assume that a is a positive integer (greater than 0) and that b and c are single-digit numbers from 0-9 inclusive. Your method should return true if a contains both b and c at among its digits, and false otherwise.
For example, the number 433407 contains 4, 3, 0, and 7 as its unique digit values, so a call to your method of containsBothDigits(433407, 7, 3) should return true. If b and c are the same number, your method should return true if that digit appears at least once among the digits; in other words, the same digit from a could match both b and c. So for example, a call of containsBothDigits(433407, 7, 7) should return true. Note that the digit b or c might appear more than once in a, as with 433407 containing two 3s.
The following table lists some additional calls to your method and their expected return values:
Note: You may not use a String to solve this problem.
Correct Answer:

Verified
public static boolean containsBothDigits...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q1: While Loop Simulation<br>For each call below
Q2: Expressions<br>For each expression in the left-hand
Q3: Assertions<br>For each of the five points
Q4: Parameter Mystery<br>At the bottom of the page,
Q5: If/Else Simulation<br>For each call below to
Q7: Programming<br>Write a static method hopscotch that shows