Side-by-side, interactive cheatsheets for Java programmers
comparing Java to other languages. Every example runs live in your browser — no
setup, no installation.
Choose your own path by reordering languages
Java reimagined without the ceremony. Go keeps the static types and compiled performance Java developers expect, then strips away generics boilerplate, checked exceptions, class hierarchies, and XML config — leaving clean, readable code that deploys as a single binary.
(result, error) return pairs make error paths visible in the signature, not hidden in throws clausesimplements keyword needed-jar flag; go build produces one fileConcise, dynamic, and dominant in data and scripting, Python trades Java's static guarantees for speed of writing — and rules data science and machine learning.
main boilerplate — a top-level print() is a whole programstream().map().collect() pipelinethrows@dataclass as the counterpart to a Java recordThe language that trades Java's ceremony for expressiveness, Ruby does in one line what Java does in ten — no type declarations, no class wrappers, no boilerplate, just code that reads like English.
3.times, array.each, map, select, reduce built into the languageinclude Comparable or Enumerable and gain 50+ methods for freeString, Integer, or any existing class at any timecase/in with array, hash, and type patterns, stable since Ruby 3.0Kotlin is what Java would be if it were redesigned today. Null safety in the type system, data classes in one line, extension functions instead of utility classes, when instead of switch pyramids, and coroutines instead of CompletableFuture — all on the JVM, fully interoperable with every Java library.
String can never be null; String? must be handled at compile time; NullPointerException becomes a compile error instead of a runtime surprisedata class Person(val name: String, val age: Int) generates equals, hashCode, toString, and copy(); Java needs a record or 50+ linesconnect(host = "x", ssl = true)"racecar".isPalindrome() instead of StringUtils.isPalindrome("racecar")suspend fun makes async code read like sequential code; replaces CompletableFuture chains with straightforward val result = fetchUser(42)The iOS side of the mobile world, for the Android/Java developer. Swift keeps Java's static typing and OOP but bakes null-safety into the type system, favours value types over references, and replaces interfaces with protocols and extensions — familiar territory with the sharp edges filed off.
?) make nullability part of the type — the compiler eliminates the NullPointerException class of buglet/var replacing finalInt, and conform existing types retroactivelythrows/try/do-catch with no checked exceptions, plus guard let and trailing closuresA modern Lisp on the JVM that replaces inheritance hierarchies with data, Clojure trades Java's mutable objects and class hierarchies for immutable persistent data structures, first-class functions, and a REPL-driven workflow.
conj and assoc return new collections; the originals are never modified, eliminating the defensive copying that Java requires(+ 1 2), (str "Hello" name), (map f coll) — the same syntax for function calls, macros, and data literals(->> coll (filter even?) (map #(* % 2))) is lazy by default, with no .collect(Collectors.toList()) neededC# does in one line what Java does in five. Properties replace getters/setters, optional parameters replace overloads, LINQ replaces verbose Streams, and async/await replaces CompletableFuture — while staying on the same statically-typed OOP foundation Java developers already know.
public string Name { get; set; } replaces pairs of getName()/setName() methods with field-like access syntaxfrom x in list where x > 5 select x reads like SQL and compiles to the same lazy pipeline as Java Streams, without .stream() boilerplateasync/await as a first-class language feature — no CompletableFuture chains, no .get() blocking; async code reads like synchronous codeFunctional meets object-oriented on the JVM — Scala blends immutable values, powerful pattern matching, and a rich type system into a concise language that feels like the Java you always wished you had.
val is immutable by default — final without the verbosity, and the preferred choice everywherecopy, and structural equality out of the boxOption[T] replaces null — absence is explicit in the type, not a runtime NullPointerException waiting to happenflatMap/map/filter — monadic pipelines that are more readable than Stream chainsstatic — companion objects replace static members with first-class singleton objects