String-2 Codingbat Full Solutions

Answers to Coding Bat's String-2 Problems, all detailed and explained.

 doubleChar H  countHi H  catDog
 countCode endOther xyzThere
 bobThere xyBalance mixString
 repeatEnd repeatFront repeatSeparator
 prefixAgain xyzMiddle getSandwich
 sameStarChar zipZap starOut
 plusOut wordEnds


1 comment :

  1. for "oneTwo":

    public String oneTwo(String str) {
    String result = "";
    for (int i=0; i<str.length()-2; i+=3){
    result = result + str.substring(i+1, i+3) + str.charAt(i);
    }
    return result;
    }

    ReplyDelete

Follow Me

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

Subscribe

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?

Upload

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