// guess the programming language of the day

$ whois java

Java

first released in 1995 · by James Gosling

$ guessprog --inspect java

year
1995
paradigm
multi paradigm
family
c like
memory
automatic gc
binding
static
safety
strong

JAVA(7)

AUTHORS
James Gosling
HISTORY
James Gosling started the language in 1991 at Sun Microsystems as part of the Green project, which targeted consumer devices such as interactive TV set-top boxes. Originally called Oak, after a tree outside Gosling's office, it was renamed Java, after the coffee, because of a trademark conflict. Java was released in 1995 with the promise of "write once, run anywhere", thanks to bytecode running on the Java Virtual Machine. Oracle acquired Sun in 2010 and now leads its development.
USAGE
One of the most widely used programming languages. Java dominates enterprise backend development, powers much of the Android ecosystem and big data tooling, and is commonly taught at universities.
SEE ALSO
Java on Wikipedia ↗
$ cat Shapes.java
import java.util.List;

public class Shapes {
    sealed interface Shape permits Circle, Square {}
    record Circle(double r) implements Shape {}
    record Square(double side) implements Shape {}

    static double area(Shape s) {
        return switch (s) {
            case Circle c -> Math.PI * c.r() * c.r();
            case Square q -> q.side() * q.side();
        };
    }

    public static void main(String[] args) {
        var shapes = List.of(new Circle(1), new Square(2));
        shapes.stream().map(Shapes::area).forEach(System.out::println);
    }
}