Skip to content

Commit 45937d1

Browse files
Create 我爱吃瓜子.md
1 parent 5658aa8 commit 45937d1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#leetcode 58
2+
```
3+
class Solution {
4+
public int lengthOfLastWord(String s) {
5+
String[] ss=s.split(" ");
6+
int index=0;
7+
if(ss.length>0){
8+
index=ss[ss.length-1].length();
9+
10+
}
11+
return index;
12+
}
13+
}
14+
```

0 commit comments

Comments
 (0)