Wrote /root/JavaX-Caches/tmp_612369684/main.java - 8012 bytes (written=8012, should be 8012) javac=0, ecj=1, useJarBot=0 Checking ECJ at port 4898 at 127.0.0.1 /root/jdk-17/bin/javac -source 11 -target 11 -nowarn -encoding utf8 -Xdiags:verbose -cp /root/.javax/x30.jar:/root/dexcompiler/android.jar:/root/dexcompiler/support-v4-22.2.1.jar:/root/javafx/javafx.base.jar:/root/javafx/javafx.graphics.jar:/root/javafx/javafx.swing.jar -d /root/JavaX-Caches/tmp_642379115 /root/JavaX-Caches/tmp_612369684/main.java 2>&1
[Compilation Error]

Compiler errors. Medium transpile. Show Java sources. Show snippet. Edit.

/root/JavaX-Caches/tmp_612369684/main.java:1: error: class, interface, or enum expected !7 ^ /root/JavaX-Caches/tmp_612369684/main.java:11: error: class, interface, or enum expected T[] tree; ^ /root/JavaX-Caches/tmp_612369684/main.java:12: error: class, interface, or enum expected static final int capacity = 50; ^ /root/JavaX-Caches/tmp_612369684/main.java:17: error: class, interface, or enum expected public ArrayBinaryTree() ^ /root/JavaX-Caches/tmp_612369684/main.java:20: error: class, interface, or enum expected tree = (T[]) new Object[capacity]; ^ /root/JavaX-Caches/tmp_612369684/main.java:21: error: class, interface, or enum expected } // constructor BinaryTree ^ /root/JavaX-Caches/tmp_612369684/main.java:26: error: class, interface, or enum expected public ArrayBinaryTree (T element) ^ /root/JavaX-Caches/tmp_612369684/main.java:29: error: class, interface, or enum expected tree = (T[]) new Object[capacity]; ^ /root/JavaX-Caches/tmp_612369684/main.java:31: error: class, interface, or enum expected tree[0] = element; ^ /root/JavaX-Caches/tmp_612369684/main.java:32: error: class, interface, or enum expected } // constructor BinaryTree ^ /root/JavaX-Caches/tmp_612369684/main.java:39: error: class, interface, or enum expected for (int ct=0; ct < tree.length; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:39: error: class, interface, or enum expected for (int ct=0; ct < tree.length; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:39: error: class, interface, or enum expected for (int ct=0; ct < tree.length; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:41: error: class, interface, or enum expected tree = temp; ^ /root/JavaX-Caches/tmp_612369684/main.java:42: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_612369684/main.java:47: error: class, interface, or enum expected public void removeLeftSubtree() ^ /root/JavaX-Caches/tmp_612369684/main.java:55: error: class, interface, or enum expected public void removeRightSubtree() ^ /root/JavaX-Caches/tmp_612369684/main.java:63: error: class, interface, or enum expected public void removeAllElements() ^ /root/JavaX-Caches/tmp_612369684/main.java:66: error: class, interface, or enum expected for (int ct=0; ct<tree.length; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:66: error: class, interface, or enum expected for (int ct=0; ct<tree.length; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:66: error: class, interface, or enum expected for (int ct=0; ct<tree.length; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:68: error: class, interface, or enum expected } // method removeAllElements ^ /root/JavaX-Caches/tmp_612369684/main.java:73: error: class, interface, or enum expected public boolean isEmpty() ^ /root/JavaX-Caches/tmp_612369684/main.java:76: error: class, interface, or enum expected } // method isEmpty ^ /root/JavaX-Caches/tmp_612369684/main.java:81: error: class, interface, or enum expected public int size() ^ /root/JavaX-Caches/tmp_612369684/main.java:84: error: class, interface, or enum expected } // method size ^ /root/JavaX-Caches/tmp_612369684/main.java:90: error: class, interface, or enum expected public boolean contains (T targetElement) ^ /root/JavaX-Caches/tmp_612369684/main.java:94: error: class, interface, or enum expected for (int ct=0; ct<count && !found; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:94: error: class, interface, or enum expected for (int ct=0; ct<count && !found; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:94: error: class, interface, or enum expected for (int ct=0; ct<count && !found; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:98: error: class, interface, or enum expected return found; ^ /root/JavaX-Caches/tmp_612369684/main.java:100: error: class, interface, or enum expected } // method contains ^ /root/JavaX-Caches/tmp_612369684/main.java:107: error: class, interface, or enum expected public T find (T targetElement) throws ElementNotFoundException ^ /root/JavaX-Caches/tmp_612369684/main.java:110: error: class, interface, or enum expected boolean found = false; ^ /root/JavaX-Caches/tmp_612369684/main.java:112: error: class, interface, or enum expected for (int ct=0; ct<count && !found; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:112: error: class, interface, or enum expected for (int ct=0; ct<count && !found; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:112: error: class, interface, or enum expected for (int ct=0; ct<count && !found; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:116: error: class, interface, or enum expected temp = tree[ct]; ^ /root/JavaX-Caches/tmp_612369684/main.java:117: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_612369684/main.java:122: error: class, interface, or enum expected return temp; ^ /root/JavaX-Caches/tmp_612369684/main.java:125: error: class, interface, or enum expected } // method find ^ /root/JavaX-Caches/tmp_612369684/main.java:132: error: class, interface, or enum expected public String toString() ^ /root/JavaX-Caches/tmp_612369684/main.java:135: error: class, interface, or enum expected inorder (0, templist); ^ /root/JavaX-Caches/tmp_612369684/main.java:136: error: class, interface, or enum expected return templist.toString(); ^ /root/JavaX-Caches/tmp_612369684/main.java:137: error: class, interface, or enum expected } // method toString ^ /root/JavaX-Caches/tmp_612369684/main.java:144: error: class, interface, or enum expected public Iterator<T> iteratorInOrder() ^ /root/JavaX-Caches/tmp_612369684/main.java:147: error: class, interface, or enum expected inorder (0, templist); ^ /root/JavaX-Caches/tmp_612369684/main.java:148: error: class, interface, or enum expected return templist.iterator(); ^ /root/JavaX-Caches/tmp_612369684/main.java:149: error: class, interface, or enum expected } // method inorder ^ /root/JavaX-Caches/tmp_612369684/main.java:160: error: class, interface, or enum expected templist.addToRear(tree[node]); ^ /root/JavaX-Caches/tmp_612369684/main.java:161: error: class, interface, or enum expected inorder ((node+1)*(2+1)-1, templist); ^ /root/JavaX-Caches/tmp_612369684/main.java:162: error: class, interface, or enum expected }//if ^ /root/JavaX-Caches/tmp_612369684/main.java:171: error: class, interface, or enum expected public Iterator<T> iteratorPreOrder() ^ /root/JavaX-Caches/tmp_612369684/main.java:174: error: class, interface, or enum expected preorder (0, templist); ^ /root/JavaX-Caches/tmp_612369684/main.java:175: error: class, interface, or enum expected return templist.iterator(); ^ /root/JavaX-Caches/tmp_612369684/main.java:176: error: class, interface, or enum expected } // method preorder ^ /root/JavaX-Caches/tmp_612369684/main.java:187: error: class, interface, or enum expected inorder ((node+1)*2-1, templist); ^ /root/JavaX-Caches/tmp_612369684/main.java:188: error: class, interface, or enum expected inorder ((node+1)*(2+1)-1, templist); ^ /root/JavaX-Caches/tmp_612369684/main.java:189: error: class, interface, or enum expected }//if ^ /root/JavaX-Caches/tmp_612369684/main.java:200: error: class, interface, or enum expected public Iterator<T> iteratorPostOrder() ^ /root/JavaX-Caches/tmp_612369684/main.java:203: error: class, interface, or enum expected postorder (0, templist); ^ /root/JavaX-Caches/tmp_612369684/main.java:204: error: class, interface, or enum expected return templist.iterator(); ^ /root/JavaX-Caches/tmp_612369684/main.java:205: error: class, interface, or enum expected } // method postorder ^ /root/JavaX-Caches/tmp_612369684/main.java:216: error: class, interface, or enum expected inorder ((node+1)*(2+1)-1, templist); ^ /root/JavaX-Caches/tmp_612369684/main.java:217: error: class, interface, or enum expected templist.addToRear(tree[node]); ^ /root/JavaX-Caches/tmp_612369684/main.java:219: error: class, interface, or enum expected }//if ^ /root/JavaX-Caches/tmp_612369684/main.java:228: error: class, interface, or enum expected public Iterator<T> iteratorLevelOrder() ^ /root/JavaX-Caches/tmp_612369684/main.java:231: error: class, interface, or enum expected for (int ct=0; ct<count; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:231: error: class, interface, or enum expected for (int ct=0; ct<count; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:231: error: class, interface, or enum expected for (int ct=0; ct<count; ct++) ^ /root/JavaX-Caches/tmp_612369684/main.java:233: error: class, interface, or enum expected return templist.iterator(); ^ /root/JavaX-Caches/tmp_612369684/main.java:234: error: class, interface, or enum expected } // method levelorder ^ 72 errors