天天看點

【LeetCode】58.最後一個單詞的長度

題目連結:

​​​https://leetcode-cn.com/problems/length-of-last-word/​​

​​JAVA中charAt()方法的使用​​​​​​

【LeetCode】58.最後一個單詞的長度

注意點:

1,仔細讀題,有一個末尾也有空格這個條件

2,’ '裡面記得是空格