Merge two strings letter by letter in Java?

前端 未结 7 1373
梦毁少年i
梦毁少年i 2021-01-21 22:05

Given two strings, A and B, create a bigger string made of the first char of A, the first char of B, the second char of A, the second char of B, and so on. Any le

7条回答
  •  不要未来只要你来
    2021-01-21 22:49

    Here is my attempt::

    public static String mixString1(String a,String b){

        String result="";
    
        int startValue = 0;
        int increment = 0;
    
        if(a.length()<=b.length()){
    
        for(int i=0;i=b.length()){
    
            for(int i=0;ib.length()){
    
            for(int j=startValue;j

提交回复
热议问题