Language: C++

/*
 * Aizu Online Judge
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 *
 * @author yoshkur
 */
public class Main {

	/**
	 * @param args the command line arguments
	 */
	public static void main(String[] args) {
		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			InputData inputData = new InputData(br);
			Processing processing = new Processing(inputData);
			System.out.println(processing.getResult());

		} catch (IOException | NumberFormatException e) {
			System.err.println(e.getLocalizedMessage());
		}
	}
}

class InputData {

	private List<Integer> numberList = new ArrayList<>();

	public InputData(BufferedReader br) throws IOException {
		String line;
		while((line = br.readLine()) != null) {
			this.numberList.add(Integer.valueOf(line.trim()));
		}
	}

	public List<Integer> getNumberList() {
		return numberList;
	}

	public void setNumberList(List<Integer> numberList) {
		this.numberList = numberList;
	}

}

class Processing {
	private static final String RETCODE = System.getProperty("line.separator");

	private InputData inputData;

	public Processing(InputData inputData) {
		this.inputData = inputData;
	}

	public String getResult() {
		String result = null;
		StringBuilder sb = new StringBuilder();
		for (int i = 0;
				i < this.inputData.getNumberList().size() 
				&& this.inputData.getNumberList().get(i) != 0;
				i++) {
			sb.append("Case ");
			sb.append(i + 1);
			sb.append(": ");
			sb.append(this.inputData.getNumberList().get(i));
			sb.append(RETCODE);
		}
		result = sb.toString().trim();
		return result;
	}
}

Compiler output:
a.cc:5:1: error: 'import' does not name a type
    5 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.io.IOException;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
    8 | import java.util.ArrayList;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: 'import' does not name a type
    9 | import java.util.Collections;
      | ^~~~~~
a.cc:9:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1: error: 'import' does not name a type
   10 | import java.util.List;
      | ^~~~~~
a.cc:10:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:16:1: error: expected unqualified-id before 'public'
   16 | public class Main {
      | ^~~~~~
a.cc:36:16: error: expected ':' before 'List'
   36 |         private List<Integer> numberList = new ArrayList<>();
      |                ^~~~~
      |                :
a.cc:36:17: error: 'List' does not name a type
   36 |         private List<Integer> numberList = new ArrayList<>();
      |                 ^~~~
a.cc:38:15: error: expected ':' before 'InputData'
   38 |         public InputData(BufferedReader br) throws IOException {
      |               ^~~~~~~~~~
      |               :
a.cc:38:40: error: expected ')' before 'br'
   38 |         public InputData(BufferedReader br) throws IOException {
      |                         ~              ^~~
      |                                        )
a.cc:45:15: error: expected ':' before 'List'
   45 |         public List<Integer> getNumberList() {
      |               ^~~~~
      |               :
a.cc:45:16: error: 'List' does not name a type
   45 |         public List<Integer> getNumberList() {
      |                ^~~~
a.cc:49:15: error: expected ':' before 'void'
   49 |         public void setNumberList(List<Integer> numberList) {
      |               ^~~~~
      |               :
a.cc:49:35: error: 'List' has not been declared
   49 |         public void setNumberList(List<Integer> numberList) {
      |                                   ^~~~
a.cc:49:39: error: expected ',' or '...' before '<' token
   49 |         public void setNumberList(List<Integer> numberList) {
      |                                       ^
a.cc:53:2: error: expected ';' after class definition
   53 | }
      |  ^
      |  ;
a.cc: In member function 'void InputData::setNumberList(int)':
a.cc:50:22: error: request for member 'numberList' in '(InputData*)this', which is of pointer type 'InputData*' (maybe you meant to use '->' ?)
   50 |                 this.numberList = numberList;
      |                      ^~~~~~~~~~
a.cc:50:35: error: 'numberList' was not declared in this scope; did you mean 'setNumberList'?
   50 |                 this.numberList = numberList;
      |                                   ^~~~~~~~~~
      |                                   setNumberList
a.cc: At global scope:
a.cc:56:16: error: expected ':' before 'static'
   56 |         private static final String RETCODE = System.getProperty("line.separator");
      |                ^~~~~~~
      |                :
a.cc:56:24: error: 'final' does not name a type
   56 |         private static final String RETCODE = System.getProperty("line.separator");
      |                        ^~~~~
a.cc:58:16: error: expected ':' before 'InputData'
   58 |         private InputData inputData;
      |                ^~~~~~~~~~
      |                :
a.cc:60:15: error: expected ':' before 'Processing'
   60 |         public Processing(InputData inputData) {
      |               ^~~~~~~~~~~
      |               :
a.cc:64:15: error: expected ':' before 'String'
   64 |         public String getResult() {
      |               ^~~~~~~
      |               :
a.cc:64:16: error: 'String' does not name a type
   64 |         public String getResult() {
      |                ^~~~~~
a.cc:80:2: error: expected ';' after class definition
   80 | }
      |  ^
      |  ;
a.cc: In constructor 'Processing::Processing(InputData)':
a.cc:61:22: error: request for member 'inputData' in '(Processing*)this', which is of pointer type 'Processing*' (maybe you meant to use '->' ?)
   61 |                 this.inputData = inputData;
      |                      ^~~~~~~~~