Language: Java


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import java.io.*;
??
class Main
{
??public static void main(String[] args) throws IOException
??{
????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
??
????String[] str = br.readLine().split(" ");
??
????int x=Integer.parseInt(str[0]);
????int y=Integer.parseInt(str[1]);
??
????System.out.println(x*y + " " + (2*x+2*y));
??}
}

Compiler output:
Main.java:2: error: class, interface, enum, or record expected
2
^
Main.java:18: error: class, interface, enum, or record expected
??
^
Main.java:21: error: illegal start of type
??public static void main(String[] args) throws IOException
^
Main.java:21: error: ';' expected
??public static void main(String[] args) throws IOException
                                                           ^
Main.java:23: error: illegal start of expression
????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:23: error: illegal start of expression
????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
 ^
Main.java:23: error: illegal start of expression
????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  ^
Main.java:23: error: illegal start of expression
????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   ^
Main.java:23: error: : expected
????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                  ^
Main.java:23: error: : expected
????BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                                                                            ^
Main.java:24: error: illegal start of expression
??
^
Main.java:24: error: illegal start of expression
??
 ^
Main.java:25: error: illegal start of expression
????String[] str = br.readLine().split(" ");
^
Main.java:25: error: illegal start of expression
????String[] str = br.readLine().split(" ");
 ^
Main.java:25: error: illegal start of expression
????String[] str = br.readLine().split(" ");
  ^
Main.java:25: error: illegal start of expression
????String[] str = br.readLine().split(" ");
   ^
Main.java:25: error: '.class' expected
????String[] str = br.readLine().split(" ");
             ^
Main.java:25: error: : expected
????String[] str = br.readLine().split(" ");
                                           ^
Main.java:26: error: illegal start of expression
??
^
Main.java:26: error: illegal start of expression
??
 ^
Main.java:27: error: illegal start of expression
????int x=Integer.parseInt(str[0]);
^
Main.java:27: error: illegal start of expression
????int x=Integer.parseInt(str[0]);
 ^
Main.java:27: error: illegal start of expression
????int x=Integer.parseInt(str[0]);
  ^
Main.java:27: error: illegal start of expression
????int x=Integer.parseInt(str[0]);
   ^
Main.java:27: error: '.class' expected
????int x=Integer.parseInt(str[0]);
        ^
Main.java:27: error: : expected
????int x=Integer.parseInt(str[0]);
                                  ^
Main.java:28: error: illegal start of expression
????int y=Integer.parseInt(str[1]);
^
Main.java:28: error: illegal start of expression
????int y=Integer.parseInt(str[1]);
 ^
Main.java:28: error: illegal start of expression
????int y=Integer.parseInt(str[1]);
  ^
Main.java:28: error: illegal start of expression
????int y=Integer.parseInt(str[1]);
   ^
Main.java:28: error: '.class' expected
????int y=Integer.parseInt(str[1]);
        ^
Main.java:28: error: : expected
????int y=Integer.parseInt(str[1]);
                                  ^
Main.java:29: error: illegal start of expression
??
^
Main.java:29: error: illegal start of expression
??
 ^
Main.java:30: error: illegal start of expression
????System.out.println(x*y + " " + (2*x+2*y));
^
Main.java:30: error: illegal start of expression
????System.out.println(x*y + " " + (2*x+2*y));
 ^
Main.java:30: error: illegal start of expression
????System.out.println(x*y + " " + (2*x+2*y));
  ^
Main.java:30: error: illegal start of expression
????System.out.println(x*y + " " + (2*x+2*y));
   ^
Main.java:30: error: : expected
????System.out.println(x*y + " " + (2*x+2*y));
                                             ^
Main.java:31: error: illegal start of expression
??}
^
Main.java:31: error: illegal start of expression
??}
 ^
Main.java:31: error: illegal start of expression
??}
  ^
42 errors