Compile-time error in implementation of SearchTree
<p>MyProg.java:44: error: Type mismatch: <em>cannot convert from void to SearchTree</em></p>

<pre><code>SearchTree nTree = nTree.insert(value);
                   ^^^^^^^^^^^^^^^^^^^
</code></pre>

<p>SearchTree.java:18: error: Type mismatch: cannot convert from void to int[]
    value = Arrays.sort(value);</p>

<pre><code>package ab12;
public class MyProg {
public static void main(String[] args) {
    QueueScheduler q = new QueueScheduler();
    int c = 0;
    for (int i = 0; i &lt; 10; i++) {
        q.dynQueue[c].put(i);
        if (c == 2) {
            c = -1;
        }
        c++;
    }   
    Out.println("1. Random");
    Out.println(q.getRandom());
    Out.println(q.getRandom());
    Out.println(q.getRandom());
    Out.println("2. Priority");
    Out.println(q.getPriority());
    Out.println(q.getPriority());
    Out.println("3. RoundRobin");
    Out.println(q.getRoundRobin());
    Set set = new Set();
    Set other = new Set();
    String e = "Hallo";
    String e2 = "H.";
    String e3 = "red";
    String e4 = "blue";
    String e5 = "light";
    set.add(e);
    set.add(e2);
    set.add(e3);
    set.remove(e);
    other.add(e2);
    other.add(e3);
    other.add(e4);
    other.add(e5);
    set.union(other);
    set.difference(other);
    set.isSubsetOf(other);
    int value [] = new int[]{1, 3, 5, 7, 9, 13, 18, 19, 21};
    SearchTree nTree = nTree.insert(value);
    int s = nTree.sum();
    int num = nTree.numberOfLeafs();



     }
}
</code></pre>
