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

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 theta-9 inclusive. Your method should return; true if a contains b at among its digits, and false otherwise. For example containDigit (421235, 1) should return true. Write a class called Lab13 with main method, in which create two integer variables: one is a random number in the range of [100000, 999999], the other one is a single digit reading from the console (using scanner); Call method containDigit, with above two variables; Print out your name, the two numbers like: My name is "..." and 234553 contains 6: false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
