Update Exercise11.java

package com.Unit10_Interface;


public class Producer {

    public String toString(char[] ch) {
        String s = "";
        for (int i = 0; i < ch.length; i++) {
            s += ch[i];
        }

        return s;
    }

    public String produce (String take) {
        char[] ch = new char[take.length()];


            for (int i = 0; i < (take.length() - 1); i = i + 2 ) {
                ch[i] = take.charAt(i+1);
                ch[i+1] = take.charAt(i);
            }
            if (take.length()%2 != 0) {
                ch[take.length() - 1] = take.charAt(take.length() - 1);
            }
        return toString(ch);
    }

   
}