Thanks for using Compiler Explorer
Sponsors
C++
Ada
Analysis
Assembly
C
C++ (Circle)
Clean
CMake
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Crystal
C#
CUDA C++
D
Dart
Erlang
Fortran
F#
Go
Haskell
ispc
Java
Kotlin
LLVM IR
Nim
OCaml
OpenCL C
Pascal
Python
Ruby
Rust
Scala
Solidity
Swift
Toit
TypeScript Native
Visual Basic
Zig
java source #1
Output
Compile to binary
Execute the code
Intel asm syntax
Demangle identifiers
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Compiler
jdk 11.0.2
jdk 12.0.1
jdk 13.0.2
jdk 14.0.2
jdk 15.0.2
jdk 16.0.1
jdk 17.0.0
jdk 18.0.0
Options
Source code
// Type your code here, or load an example. class Square { static int square(int num) { return num * num; } }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
About the author
Changelog
Version tree