Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

class Main{

	static class FastReader {

		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}
	}

	public static void main(String[] args) throws IOException {
		FastReader sc = new FastReader();
		char[][] a = new char[3][3];
		for (int i = 0; i < 3; i++) {
			a[i] = sc.nextLine().toCharArray();
		}
		System.out.println(a[0][0]+""+a[1][1]+""+a[2][2]);
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
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.io.IOException;
      | ^~~~~~
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.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.StringTokenizer;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:17: error: 'BufferedReader' does not name a type
   10 |                 BufferedReader br;
      |                 ^~~~~~~~~~~~~~
a.cc:11:17: error: 'StringTokenizer' does not name a type
   11 |                 StringTokenizer st;
      |                 ^~~~~~~~~~~~~~~
a.cc:13:23: error: expected ':' before 'FastReader'
   13 |                 public FastReader() {
      |                       ^~~~~~~~~~~
      |                       :
a.cc:17:17: error: 'String' does not name a type
   17 |                 String next() {
      |                 ^~~~~~
a.cc:40:17: error: 'String' does not name a type
   40 |                 String nextLine() {
      |                 ^~~~~~
a.cc:49:10: error: expected ';' after class definition
   49 |         }
      |          ^
      |          ;
a.cc:8:9: error: a storage class can only be specified for objects and functions
    8 |         static class FastReader {
      |         ^~~~~~
a.cc:51:15: error: expected ':' before 'static'
   51 |         public static void main(String[] args) throws IOException {
      |               ^~~~~~~
      |               :
a.cc:51:33: error: 'String' has not been declared
   51 |         public static void main(String[] args) throws IOException {
      |                                 ^~~~~~
a.cc:51:42: error: expected ',' or '...' before 'args'
   51 |         public static void main(String[] args) throws IOException {
      |                                          ^~~~
a.cc:51:46: error: expected ';' at end of member declaration
   51 |         public static void main(String[] args) throws IOException {
      |                                              ^
      |                                               ;
a.cc:51:48: error: 'throws' does not name a type
   51 |         public static void main(String[] args) throws IOException {
      |                                                ^~~~~~
a.cc:59:2: error: expected ';' after class definition
   59 | }
      |  ^
      |  ;
a.cc: In constructor 'Main::FastReader::FastReader()':
a.cc:14:25: error: 'br' was not declared in this scope
   14 |                         br = new BufferedReader(new InputStreamReader(System.in));
      |                         ^~
a.cc:14:34: error: expected type-specifier before 'BufferedReader'
   14 |                         br = new BufferedReader(new InputStreamReader(System.in));
      |                                  ^~~~~~~~~~~~~~
a.cc: In member function 'int Main::FastReader::nextInt()':
a.cc:29:32: error: 'Integer' was not declared in this scope
   29 |                         return Integer.parseInt(next());
      |                                ^~~~~~~
a.cc:29:49: error: 'next' was not declared in this scope; did you mean 'nextInt'?
   29 |                         return Integer.parseInt(next());
      |                                                 ^~~~
      |                                                 nextInt
a.cc: In member function 'long int Main::FastReader::nextLong()':
a.cc:33:32: error: 'Long' was not declared in this scope; did you mean 'long'?
   33 |                         return Long.parseLong(next());
      |                                ^~~~
      |                                long
a.cc:33:47: error: 'next' was not declared in this scope; did you mean 'nextInt'?
   33 |                         return Long.parseLong(next());
      |                                               ^~~~
      |                                               nextInt
a.cc: In member function 'double Main::FastReader::nextDouble()':
a.cc:37:32: error: 'Double' was not declared in this scope; did you mean 'double'?
   37 |                         return Double.parseDouble(next());
      |                                ^~~~~~
      |                                double
a.cc:37:51: error: 'next' was not declared in this scope; did you mean 'nextInt'?
   37 |                         return Double.parseDouble(next());
      |                                                   ^~~~
      |                                                   nextInt