<human>: Convert the following Java 8 code to Java 17 using sealed classes:

```java
// Java 8 code
public abstract class Shape {
  abstract double area();
}

public class Circle extends Shape {
  private double radius;
  public Circle(double radius) {
    this.radius = radius;
  }
  @Override
  double area() {
    return Math.PI * radius * radius;
  }
}

public class Square extends Shape {
  private double side;
  public Square(double side) {
    this.side = side;
  }
  @Override
  double area() {
    return side * side;
  }
}
```

<bot>: ```java
// Java 17 code using sealed classes
public sealed abstract class Shape permits Circle, Square {
  abstract double area();
}

public final class Circle extends Shape {
  private double radius;
  public Circle(double radius) {
    this.radius = radius;
  }
  @Override
  double area() {
    return Math.PI * radius * radius;
  }
}

public final class Square extends Shape {
  private double side;
  public Square(double side) {
    this.side = side;
  }
  @Override
  double area() {
    return side * side;
  }
}
```