Wrote /root/JavaX-Caches/tmp_1205293348/main.java - 2613 bytes (written=2613, should be 2613) 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_263923681 /root/JavaX-Caches/tmp_1205293348/main.java 2>&1
[Compilation Error]

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

/root/JavaX-Caches/tmp_1205293348/main.java:1: error: class, interface, or enum expected sclass MountainsAndValleys { ^ /root/JavaX-Caches/tmp_1205293348/main.java:3: error: class, interface, or enum expected gettable new IntBuffer highs; ^ /root/JavaX-Caches/tmp_1205293348/main.java:4: error: class, interface, or enum expected gettable new IntBuffer lows; ^ /root/JavaX-Caches/tmp_1205293348/main.java:6: error: class, interface, or enum expected *() {} ^ /root/JavaX-Caches/tmp_1205293348/main.java:11: error: class, interface, or enum expected if (n == 0) ret; ^ /root/JavaX-Caches/tmp_1205293348/main.java:12: error: class, interface, or enum expected highs.add(0); ^ /root/JavaX-Caches/tmp_1205293348/main.java:13: error: class, interface, or enum expected lows.add(0); ^ /root/JavaX-Caches/tmp_1205293348/main.java:15: error: class, interface, or enum expected int i = 1; ^ /root/JavaX-Caches/tmp_1205293348/main.java:16: error: class, interface, or enum expected while (i < n) { ^ /root/JavaX-Caches/tmp_1205293348/main.java:20: error: class, interface, or enum expected int j = i+1; ^ /root/JavaX-Caches/tmp_1205293348/main.java:21: error: class, interface, or enum expected while (j < n && values[j] == value) ++j; ^ /root/JavaX-Caches/tmp_1205293348/main.java:25: error: class, interface, or enum expected var last = values[i-1]; ^ /root/JavaX-Caches/tmp_1205293348/main.java:26: error: class, interface, or enum expected var list = value > last ? highs : lows; ^ /root/JavaX-Caches/tmp_1205293348/main.java:29: error: class, interface, or enum expected if (values[list.last()] == last) ^ /root/JavaX-Caches/tmp_1205293348/main.java:31: error: class, interface, or enum expected list.add(i); ^ /root/JavaX-Caches/tmp_1205293348/main.java:33: error: class, interface, or enum expected i = j; ^ /root/JavaX-Caches/tmp_1205293348/main.java:34: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_1205293348/main.java:37: error: class, interface, or enum expected double get(int idx) { ret values[idx]; } ^ /root/JavaX-Caches/tmp_1205293348/main.java:43: error: class, interface, or enum expected if (j >= 0) ret idx-1; ^ /root/JavaX-Caches/tmp_1205293348/main.java:44: error: class, interface, or enum expected j = -j-1; ^ /root/JavaX-Caches/tmp_1205293348/main.java:45: error: class, interface, or enum expected j--; ^ /root/JavaX-Caches/tmp_1205293348/main.java:46: error: class, interface, or enum expected ret j >= 0 ? highsOrLows.get(j) : -1; ^ /root/JavaX-Caches/tmp_1205293348/main.java:47: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_1205293348/main.java:53: error: class, interface, or enum expected if (j >= 0) ret idx+1; ^ /root/JavaX-Caches/tmp_1205293348/main.java:54: error: class, interface, or enum expected j = -j-1; ^ /root/JavaX-Caches/tmp_1205293348/main.java:55: error: class, interface, or enum expected ret j < l(highsOrLows) ? highsOrLows.get(j) : -1; ^ /root/JavaX-Caches/tmp_1205293348/main.java:56: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_1205293348/main.java:61: error: class, interface, or enum expected while (true) { ^ /root/JavaX-Caches/tmp_1205293348/main.java:63: error: class, interface, or enum expected if (j < 0 || cmp(get(j), value) == direction) ret j; ^ /root/JavaX-Caches/tmp_1205293348/main.java:64: error: class, interface, or enum expected idx = j; ^ /root/JavaX-Caches/tmp_1205293348/main.java:65: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_1205293348/main.java:71: error: class, interface, or enum expected while (true) { ^ /root/JavaX-Caches/tmp_1205293348/main.java:73: error: class, interface, or enum expected if (j < 0 || cmp(get(j), value) == direction) ret j; ^ /root/JavaX-Caches/tmp_1205293348/main.java:74: error: class, interface, or enum expected idx = j; ^ /root/JavaX-Caches/tmp_1205293348/main.java:75: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_1205293348/main.java:80: error: class, interface, or enum expected int prevHigh(int idx) { ret prev(highs, idx); } ^ /root/JavaX-Caches/tmp_1205293348/main.java:81: error: class, interface, or enum expected int nextHigh(int idx) { ret next(highs, idx); } ^ /root/JavaX-Caches/tmp_1205293348/main.java:82: error: class, interface, or enum expected int prevLow(int idx) { ret prev(lows, idx); } ^ /root/JavaX-Caches/tmp_1205293348/main.java:83: error: class, interface, or enum expected int nextLow(int idx) { ret next(lows, idx); } ^ /root/JavaX-Caches/tmp_1205293348/main.java:87: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_1205293348/main.java:91: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_1205293348/main.java:95: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_1205293348/main.java:99: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_1205293348/main.java:103: error: class, interface, or enum expected ret high < 0 || low < high ? low : high; ^ /root/JavaX-Caches/tmp_1205293348/main.java:104: error: class, interface, or enum expected } ^ 45 errors