Question: Write a method named allDigitsOdd that returns whether every digit of a given integer is odd. Your method should return true if the number consists

 Write a method named allDigitsOdd that returns whether every digit of

Write a method named allDigitsOdd that returns whether every digit of a given integer is odd. Your method should return true if the number consists entirely of odd digits and false if any of its digits are even. 0, 2, 4, 6, and 8 are even digits, and 1, 3, 5, 7, 9 are odd digits. Your method should work for positive and negative numbers. For example, here are some calls to your method and their expected results: Call Value Returned allDigitsodd(4822116) false allDigitsodd (135319) true allDigitsOdd (9175293) false allDigitsodd(-137) true You should not use a String to solve this problem Type your solution here: 1 4 7 10 12

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!