Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java code please help (4) Boolean Method ( 10 points) Write a static method named containsBoth Digits that accepts three integer parameters a, b, and

image text in transcribed

Java code please help

(4) Boolean Method ( 10 points) Write a static method named containsBoth Digits that accepts three integer parameters a, b, and me that a is a positive integer (greater than O) and that b and c are single-dieit numbrtrom inclusive. Your method should return true if a contains both b and c at among its otherwise digits, and talne For example, the number 433407 contains 4, 3. 0, and 7 as its unique digit values method of containsBothDigits (43340, 7. 3) should return true If b and c are the , your method should return true if that digit appears at least once among the digits, in it from a could match both b and c. So for example, a call of same number other words, the same dig containsBothDigits (433407, 3, 3) should return true. Note that the digit bor e might appear more than once in a, as with 433407 containing two 3's. Note: You may not use a string to solve this problem public static

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions