about | help | code help+videos | done | prefs |
getLastTwoLetters
public String getLastTwoLetters(String word)
public String getLastTwoLetters(String word) { int len = word.length(); String s = word.substring(len-2); return s; } getLastTwoLetters("abc") → "bc" getLastTwoLetters("123") → "23" getLastTwoLetters("Hollow") → "ow" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 11
Copyright Nick Parlante 2017 - privacy