Get Mystery Box with random crypto!

#N2042. Check if Numbers Are Ascending in a Sentence problem l | Leetcode in Java && MySQL

#N2042. Check if Numbers Are Ascending in a Sentence
problem link

#solution
class Solution {
public boolean areNumbersAscending(String s) {
int temp = 0;
for(String word: s.split(" ")){
if(Character.isDigit(word.charAt(0))){
int num = Integer.parseInt(word);
if(num > temp) temp = num;
else return false;
}
}

return true;

}
}