Question: java please Write a method to check if the digits stored in a string are ascendingly or descending ordered. For example, for the following string:

java please

java please Write a method to check if the digits stored in

Write a method to check if the digits stored in a string are ascendingly or descending ordered. For example, for the following string: He2110 J4av5a 6 W8orld. Digits in this string are: 2, 4, 5, 6, 8. They are ascendingly ordered. The signature of the method is: boolean is DigitsSortedInString(String str, boolean ascend); if input param ascend is true, check digits in string "str are ascendingly ordered, otherwise, check ifstr is descending ordered

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!