| about | help | code help+videos | done | prefs |
conCatAllButLastLetter
public String conCatAllButLastLetter(String a, String b)
public String conCatAllButLastLetter(String a, String b) {
int lenA = a.length();
int lenB = b.length();
String aNoLast = a.substring(0,lenA-1);
String bNoLast = b.substring(0,lenB-1);
String combo = aNoLast + bNoLast;
return combo;
}
conCatAllButLastLetter("Hello", "There") → "HellTher" conCatAllButLastLetter("Black", "White") → "BlacWhit" conCatAllButLastLetter("Red", "Green") → "ReGree" ...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: 13
Copyright Nick Parlante 2017 - privacy