Correct mistakes in the code

Report a typo

Correct all mistakes in the code to run it. Don't declare or remove any declared classes or interfaces. Just correct access modifiers and mistakes in the permits clause.

Sample Input 1:

Congratulations, all tests passed succesfully!

Sample Output 1:

Congratulations, all tests passed succesfully!
Write a program in Java 17
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println(scanner.nextLine());
}
}

sealed interface ShapeInterface
permits TriangleInterface { }

sealed class Shape
permits Triangle, Square, Circle { }


public non-sealed interface TriangleInterface extends ShapeInterface { }

final class Triangle extends Shape implements ShapeInterface { }

protected sealed class Square extends Shape { }
___

Create a free account to access the full topic