Java Nested Loops - Cheerpj Typing CST Test
Loading…
Java Nested Loops — Cheerpj Code
Uses nested loops to print a pattern.
# cheerpj/demo/NestedLoops.java
public class NestedLoops {
public static void main(String[] args) {
for (int i = 1; i <= 3; i++) {
for (int j = 1; j <= 3; j++) {
System.out.print(i*j + " ");
}
System.out.println();
}
}
}Cheerpj Language Guide
CheerpJ is a WebAssembly-based Java-to-JavaScript/WebAssembly compiler and runtime that allows running unmodified Java applications directly inside the browser without plugins. It converts Java bytecode into WebAssembly + JavaScript, enabling full client-side execution of existing JVM applications, applets, and libraries.
Primary Use Cases
- ▸Running legacy Java Swing/AWT desktop apps in the browser
- ▸Migrating Java Applets to modern WebAssembly environments
- ▸Enterprise internal tools requiring Java libraries
- ▸Embedding Java libraries inside JS/Wasm web apps
- ▸Preserving old JVM-based simulations, tools, and educational software
Notable Features
- ▸Convert Java bytecode directly into Wasm + JavaScript
- ▸Full Java runtime emulation in browser
- ▸Supports Swing and AWT UI rendering
- ▸Works without plugins or local JVM
- ▸Can run unmodified .jar files client-side
Origin & Creator
CheerpJ is developed by Leaning Technologies, known for compiling traditional languages to modern web targets like WebAssembly.
Industrial Note
CheerpJ is heavily used by enterprises wanting to preserve legacy Java Swing/AWT applications or Java applets and make them run in modern browsers without rewriting them.