Language: C++

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;

class Main {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        List<Integer> list = new ArrayList<>();
        for(int i=0; i<n; i++){
            list.add(scanner.nextInt());
        }
        scanner.close();
        int count = 0;
        out:for(int i=0; i<list.size(); i++){
            for(int j=0; j<=i; j++){
                if(list.get(i).compareTo(list.get(j))==1){
                    continue out;
                }
            }
            count += 1;
        }
        System.out.println(count);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.List;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.ArrayList;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:11: error: expected ':' before 'static'
    7 |     public static void main(String[] args){
      |           ^~~~~~~
      |           :
a.cc:7:29: error: 'String' has not been declared
    7 |     public static void main(String[] args){
      |                             ^~~~~~
a.cc:7:38: error: expected ',' or '...' before 'args'
    7 |     public static void main(String[] args){
      |                                      ^~~~
a.cc:26:2: error: expected ';' after class definition
   26 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:8:9: error: 'Scanner' was not declared in this scope
    8 |         Scanner scanner = new Scanner(System.in);
      |         ^~~~~~~
a.cc:9:17: error: 'scanner' was not declared in this scope
    9 |         int n = scanner.nextInt();
      |                 ^~~~~~~
a.cc:10:9: error: 'List' was not declared in this scope
   10 |         List<Integer> list = new ArrayList<>();
      |         ^~~~
a.cc:10:14: error: 'Integer' was not declared in this scope
   10 |         List<Integer> list = new ArrayList<>();
      |              ^~~~~~~
a.cc:10:23: error: 'list' was not declared in this scope
   10 |         List<Integer> list = new ArrayList<>();
      |                       ^~~~
a.cc:10:34: error: 'ArrayList' does not name a type
   10 |         List<Integer> list = new ArrayList<>();
      |                                  ^~~~~~~~~
a.cc:10:44: error: expected primary-expression before '>' token
   10 |         List<Integer> list = new ArrayList<>();
      |                                            ^
a.cc:10:46: error: expected primary-expression before ')' token
   10 |         List<Integer> list = new ArrayList<>();
      |                                              ^
a.cc:19:30: error: expected ';' before 'out'
   19 |                     continue out;
      |                              ^~~
a.cc:19:30: error: 'out' was not declared in this scope
a.cc:24:9: error: 'System' was not declared in this scope
   24 |         System.out.println(count);
      |         ^~~~~~