Java > String-1 > nonStart (CodingBat Solution)


Given 2 strings, return their concatenation, except omit the first char of each. The strings will be at least length 1.

nonStart("Hello", "There") → "ellohere"
nonStart("java", "code") → "avaode"
nonStart("shotl", "java") → "hotlava"


public String nonStart(String a, String b) {
  return a.substring(1,a.length()) + b.substring(1,b.length());

1 comment :

  1. public String nonStart(String a, String b) {
    return a.substring(1) + b.substring(1);


Follow Me

If you like our content, feel free to follow me to stay updated.


Enter your email address:

We hate spam as much as you do.

Upload Material

Got an exam, project, tutorial video, exercise, solutions, unsolved problem, question, solution manual? We are open to any coding material. Why not upload?


Copyright © 2012 - 2014 Java Problems  --  About  --  Attribution  --  Privacy Policy  --  Terms of Use  --  Contact