Groovy · online compiler

Run Groovy online

Run Groovy 4 online — dynamic JVM language, browser-hosted.

Version
Firecracker microVM live per-test verdicts multi-file compile

Groovy is a dynamic, optionally-typed language on the JVM — Grails, Gradle build scripts, Jenkins pipelines. It is Java-source-compatible and reads like a script.

ls-judge runs Groovy 4.x on a supported JVM inside a Firecracker microVM.

Starter code

What you get in Groovy

Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.

groovy
Groovy 4
def n = System.in.newReader().readLine().trim().toInteger(); println(n * 2)
stdin →21
expected →42
FAQ

Common questions about Groovy on ls-judge

Groovy 4?
Yes — the current stable.
Grape / grapes dependency loading?
No — no network in the sandbox.
Can I use @CompileStatic?
Yes.
Free?
Yes.
Further reading
Also try