criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.Scanner; 
public class Main { 
public static void main(String[] args) {
 // ?¨??????\??????????????????????????????????????? 
Scanner sc = new Scanner(System.in);
 int w = sc.nextInt();
 int n = sc.nextInt();
 int kari;
 int[] values = new int[w];
 for (int i = 0; i < values.length; i++) {
 values[i] = i + 1;
 }
 for (int i = 0; i < n; i++) { 
String str = sc.next();
 String[] ab = str.split(",");
 int a = Integer.parseInt(ab[0]) - 1;
 int b = Integer.parseInt(ab[1]) - 1; 
// a??¨b????????£???values?????????????????? 
 kari = values[a];
 values[a] = values[b];
 values[b] = values[a];
} 
// values?????????????????? 
for(i = 0;i<values;i++){
   System.out.println("values[i]");
  i++ 
}  
}
 }

Compiler output:
Main.java:26: error: ';' expected
  i++ 
     ^
1 error
Language: Java

import java.util.Scanner; 
public class Main { 
public static void main(String[] args) {
 // ?¨??????\??????????????????????????????????????? 
Scanner sc = new Scanner(System.in);
 int w = sc.nextInt();
 int n = sc.nextInt();
 int kari;
 int[] values = new int[w];
 for (int i = 0; i < values.length; i++) {
 values[i] = i + 1;
 }
 for (int i = 0; i < n; i++) { 
String str = sc.next();
 String[] ab = str.split(",");
 int a = Integer.parseInt(ab[0]) - 1;
 int b = Integer.parseInt(ab[1]) - 1; 
// a??¨b????????£???values?????????????????? 
 kari = values[a];
 values[a] = values[b];
 values[b] = values[a];
} 
// values?????????????????? 
for(i = 0;i<values;i++){
   System.out.println("values[i]");
  i++;
}  
}
 }

Compiler output:
Main.java:24: error: cannot find symbol
for(i = 0;i<values;i++){
    ^
  symbol:   variable i
  location: class Main
Main.java:24: error: cannot find symbol
for(i = 0;i<values;i++){
          ^
  symbol:   variable i
  location: class Main
Main.java:24: error: cannot find symbol
for(i = 0;i<values;i++){
                   ^
  symbol:   variable i
  location: class Main
Main.java:26: error: cannot find symbol
  i++;
  ^
  symbol:   variable i
  location: class Main
4 errors
Language: Java

import java.util.Scanner; 
public class Main { 
public static void main(String[] args) {
 // ?¨??????\??????????????????????????????????????? 
Scanner sc = new Scanner(System.in);
 int w = sc.nextInt();
 int n = sc.nextInt();
 int kari;
 int i:  
 int[] values = new int[w];
 for (i = 0; i < values.length; i++) {
 values[i] = i + 1;
 }
 for (i = 0; i < n; i++) { 
String str = sc.next();
 String[] ab = str.split(",");
 int a = Integer.parseInt(ab[0]) - 1;
 int b = Integer.parseInt(ab[1]) - 1; 
// a??¨b????????£???values?????????????????? 
 kari = values[a];
 values[a] = values[b];
 values[b] = values[a];
} 
// values?????????????????? 
for(i = 0;i<values;i++){
   System.out.println("values[i]");
  i++;
}  
}
 }

Compiler output:
Main.java:9: error: ';' expected
 int i:  
      ^
1 error
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int[] values = new int[w];
for (int i = 0; i < values.length; i++) {
values[i] = i + 1;
}
for (int i = 0; i < n; i++) {
String str = sc.next();
String[] ab = str.split(",");
int a = Integer.parseInt(ab[0]) - 1;
int b = Integer.parseInt(ab[1]) - 1;
// a??¨b????????£???values??????????????????
int tmp = values[a];
            values[a] = values[b];
            values[b] = tmp;
}
// values??????????????????
for(i=0;i<w;i++){
System.out.println(values[i]);
}
}
}

Compiler output:
Main.java:23: error: cannot find symbol
for(i=0;i<w;i++){
    ^
  symbol:   variable i
  location: class Main
Main.java:23: error: cannot find symbol
for(i=0;i<w;i++){
        ^
  symbol:   variable i
  location: class Main
Main.java:23: error: cannot find symbol
for(i=0;i<w;i++){
            ^
  symbol:   variable i
  location: class Main
Main.java:24: error: cannot find symbol
System.out.println(values[i]);
                          ^
  symbol:   variable i
  location: class Main
4 errors
Language: Java

import java.util.Scanner; 
public class Main { 
public static void main(String[] args) {
 // ?¨??????\??????????????????????????????????????? 
Scanner sc = new Scanner(System.in);
 int w = sc.nextInt();
 int n = sc.nextInt();
 int kari;
 int i;
 int[] values = new int[w];
 for (i = 0; i < values.length; i++) {
 values[i] = i + 1;
 }
 for (i = 0; i < n; i++) { 
String str = sc.next();
 String[] ab = str.split(",");
 int a = Integer.parseInt(ab[0]) - 1;
 int b = Integer.parseInt(ab[1]) - 1; 
// a??¨b????????£???values?????????????????? 
 kari = values[a];
 values[a] = values[b];
 values[b] = values[a];
} 
// values?????????????????? 
for(i = 0;i<values;i++){
   System.out.println("values[i]");
  i++;
}  
}
 }

Compiler output:
Main.java:25: error: bad operand types for binary operator '<'
for(i = 0;i<values;i++){
           ^
  first type:  int
  second type: int[]
1 error
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int w = sc.nextInt();
		int n = sc.nextInt();
		int[] values = new int[w];
		for (int i = 0; i < values.length; i++) {
			values[i] = i + 1;
		}
		for (int i = 0; i < n; i++) {
			String str = sc.next();
			String[] ab = str.split(",");
			int a = Integer.parseInt(ab[0]) - 1;
			int b = Integer.parseInt(ab[1]) - 1;
			int c;
			c = values[a];
			values[a] = values[b];
			values[b] = c;
		}
		for (int i = 0; i < values.length; i++) {
			System.out.println(values[i]);
		}
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class AOJ3_3{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int w = sc.nextInt();
		int n = sc.nextInt();
		int[] values = new int[w];
		for(int i=0;i<values.length;i++){
			values[i] = i + 1;
		}
		for(int i = 0;i<n;i++){
			String str = sc.next();
			String[] ab = str.split(",");
			int a = Integer.parseInt(ab[0]) -1;
			int b = Integer.parseInt(ab[0]) -1;
			System.out.println(values[a]);
			int temp = values[a];
			values[a] = values[b];
			values[b] = temp;
			System.out.println(values[a]);
		}
		values[0] = 2;
		values[4] = 3;
		for(int i = 0;i<w;i++){
			System.out.println(values[i]);
		}
	}
}

Compiler output:
Main.java:3: error: class AOJ3_3 is public, should be declared in a file named AOJ3_3.java
public class AOJ3_3{
       ^
1 error
Language: Java

import java.util,Scanner;

public class Main{
public statiac void main(String[] args){
 Scanner sc = new Scanner(System.in);
 int w =sc.nextInt();
 int n =sc.nextInt();
 int[] values =new int[w];
 for(int i=0;i<values.length;i++){
  values[i]=i+1;
 }
 for(int i=0;i<n;i++){
string str= sc.next();
String[]ab= str.split(",");
int a=Integer.parseInt(ab[0])-1;
int b=Integer.parseInt(ab[0])-1;
values[a]=b+1;
values[b]=a+1;
}
for(int i=0;i<values.length;i++){
 printf("%d\n",values[i]);
 }
}
}

Compiler output:
Main.java:1: error: ';' expected
import java.util,Scanner;
                ^
Main.java:4: error: <identifier> expected
public statiac void main(String[] args){
              ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
public static void main(String[] args){
 Scanner sc = new Scanner(System.in);
 int w =sc.nextInt();
 int n =sc.nextInt();
 int[] values =new int[w];
 for(int i=0;i<values.length;i++){
  values[i]=i+1;
 }
 for(int i=0;i<n;i++){
string str= sc.next();
String[]ab= str.split(",");
int a=Integer.parseInt(ab[0])-1;
int b=Integer.parseInt(ab[0])-1;
values[a]=b+1;
values[b]=a+1;
}
for(int i=0;i<values.length;i++){
 printf("%d\n",values[i]);
 }
}
}

Compiler output:
Main.java:13: error: cannot find symbol
string str= sc.next();
^
  symbol:   class string
  location: class Main
Main.java:21: error: cannot find symbol
 printf("%d\n",values[i]);
 ^
  symbol:   method printf(String,int)
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
 public class Main {
 public static void main(String[] args) {
 // ?¨??????\??????????????????????????????????????? 
Scanner sc = new Scanner(System.in);
 int w = sc.nextInt();
 int n = sc.nextInt();
 int[] values = new int[w];
 for (int i = 0; i < values.length; i++) { 
values[i] = i + 1; 
} 
for (int i = 0; i < n; i++) {
 String str = sc.next();
 String[] ab = str.split(",");
 int a = Integer.parseInt(ab[0]) - 1;
 int b = Integer.parseInt(ab[1]) - 1;
 // a??¨b????????£???values??????????????????
 int c = values[a];
 values[a]=values[b];
 values[b] = int c; 
}
 // values??????????????????
 for(i = 0;i<w;i++){
   System.out.printf(values[i]);
}   
}
 }

Compiler output:
Main.java:20: error: '.class' expected
 values[b] = int c; 
                 ^
1 error
Language: Java

import java.util.Scanner;
 public class Main {
 public static void main(String[] args) {
 // ?¨??????\??????????????????????????????????????? 
Scanner sc = new Scanner(System.in);
 int w = sc.nextInt();
 int n = sc.nextInt();
 int[] values = new int[w];
 for (int i = 0; i < values.length; i++) { 
values[i] = i + 1; 
} 
for (int i = 0; i < n; i++) {
 String str = sc.next();
 String[] ab = str.split(",");
 int a = Integer.parseInt(ab[0]) - 1;
 int b = Integer.parseInt(ab[1]) - 1;
 // a??¨b????????£???values??????????????????
 int c = values[a];
 values[a]=values[b];
 values[b] =  c; 
}
 // values??????????????????
 for(i = 0;i<w;i++){
   System.out.printf(values[i]);
}   
}
 }

Compiler output:
Main.java:23: error: cannot find symbol
 for(i = 0;i<w;i++){
     ^
  symbol:   variable i
  location: class Main
Main.java:23: error: cannot find symbol
 for(i = 0;i<w;i++){
           ^
  symbol:   variable i
  location: class Main
Main.java:23: error: cannot find symbol
 for(i = 0;i<w;i++){
               ^
  symbol:   variable i
  location: class Main
Main.java:24: error: cannot find symbol
   System.out.printf(values[i]);
                            ^
  symbol:   variable i
  location: class Main
Main.java:24: error: no suitable method found for printf(int)
   System.out.printf(values[i]);
             ^
    method PrintStream.printf(String,Object...) is not applicable
      (argument mismatch; int cannot be converted to String)
    method PrintStream.printf(Locale,String,Object...) is not applicable
      (argument mismatch; int cannot be converted to Locale)
5 errors
Language: Java

import java.util.Scanner;
 public class Main {
 public static void main(String[] args) {
 // ?¨??????\??????????????????????????????????????? 
Scanner sc = new Scanner(System.in);
 int w = sc.nextInt();
 int n = sc.nextInt();
 int i;
 int c = 0;
 int[] values = new int[w];
 for (int i = 0; i < values.length; i++) { 
values[i] = i + 1; 
} 
for (int i = 0; i < n; i++) {
 String str = sc.next();
 String[] ab = str.split(",");
 int a = Integer.parseInt(ab[0]) - 1;
 int b = Integer.parseInt(ab[1]) - 1;
 // a??¨b????????£???values??????????????????
 c = values[a];
 values[a] =  values[b];
 values[b] =  c; 
}
 // values??????????????????
 for(i = 0;i<w;i++){
   System.out.printf(values[i]);
}   
}
 }

Compiler output:
Main.java:11: error: variable i is already defined in method main(String[])
 for (int i = 0; i < values.length; i++) { 
          ^
Main.java:14: error: variable i is already defined in method main(String[])
for (int i = 0; i < n; i++) {
         ^
Main.java:26: error: no suitable method found for printf(int)
   System.out.printf(values[i]);
             ^
    method PrintStream.printf(String,Object...) is not applicable
      (argument mismatch; int cannot be converted to String)
    method PrintStream.printf(Locale,String,Object...) is not applicable
      (argument mismatch; int cannot be converted to Locale)
3 errors
Language: Java

import java.util.Scanner;
 public class Main {
 public static void main(String[] args) {
 // ?¨??????\??????????????????????????????????????? 
Scanner sc = new Scanner(System.in);
 int w = sc.nextInt();
 int n = sc.nextInt();
 int i;
 int c = 0;
 int[] values = new int[w];
 for (i = 0; i < values.length; i++) { 
values[i] = i + 1; 
} 
for (i = 0; i < n; i++) {
 String str = sc.next();
 String[] ab = str.split(",");
 int a = Integer.parseInt(ab[0]) - 1;
 int b = Integer.parseInt(ab[1]) - 1;
 // a??¨b????????£???values??????????????????
 c = values[a];
 values[a] =  values[b];
 values[b] =  c; 
}
 // values??????????????????
 for(i = 0;i<w;i++){
   System.out.printf(values[i]);
}   
}
 }

Compiler output:
Main.java:26: error: no suitable method found for printf(int)
   System.out.printf(values[i]);
             ^
    method PrintStream.printf(String,Object...) is not applicable
      (argument mismatch; int cannot be converted to String)
    method PrintStream.printf(Locale,String,Object...) is not applicable
      (argument mismatch; int cannot be converted to Locale)
1 error
Language: Java

import java.util.Scanner;
class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int w, n, a, b, i, swap;
		w = scan.nextInt();
		int[] amidakuji = new int[w];
		for (i = 0; i < n; i ++) amidakuji[i] = i;
		n = scan.nextInt();
		for (i = 0; i < n; i ++) {
			a = scan.nextInt();
			b = scan.nextInt();
			a --; b --;
			swap = amidakuji[a]; amidakuji[a] = amidakuji[b]; amidakuji[b] = swap;
		}
		for (i = 0; i < n; i ++) {
			System.out.println(amidakuji[i] + 1);
		}
	}
}

Compiler output:
Main.java:8: error: variable n might not have been initialized
		for (i = 0; i < n; i ++) amidakuji[i] = i;
		                ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
public static void main(String[] args){
 Scanner sc = new Scanner(System.in);
 int w =sc.nextInt();
 int n =sc.nextInt();
 int[] values =new int[w];
 for(int i=0;i<values.length;i++){
  values[i]=i+1;
 }
 for(int i=0;i<n;i++){
String str= sc.next();
String[]ab= str.split(",");
int a=Integer.parseInt(ab[0])-1;
int b=Integer.parseInt(ab[1])-1;
int t=swap[a];
swap[a]=swap[b];
swap[b]=t;
}
for(int i=0;i<values.length;i++){
 System.out.printf("%d\n",values[i]);
 }
}
}

Compiler output:
Main.java:17: error: cannot find symbol
int t=swap[a];
      ^
  symbol:   variable swap
  location: class Main
Main.java:18: error: cannot find symbol
swap[a]=swap[b];
^
  symbol:   variable swap
  location: class Main
Main.java:18: error: cannot find symbol
swap[a]=swap[b];
        ^
  symbol:   variable swap
  location: class Main
Main.java:19: error: cannot find symbol
swap[b]=t;
^
  symbol:   variable swap
  location: class Main
4 errors
Language: Java

import java.util.Scanner;

public class AOJ3_3{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int w = sc.nextInt();
		int n = sc.nextInt();
		int[] values = new int[w];
		for(int i=0;i<values.length;i++){
			values[i] = i + 1;
		}
		for(int i = 0;i<n;i++){
			String str = sc.next();
			String[] ab = str.split(",");
			int a = Integer.parseInt(ab[0]) -1;
			int b = Integer.parseInt(ab[1]) -1;
			int temp = values[a];
			values[a] = values[b];
			values[b] = temp;
		}
		for(int i = 0;i<w;i++){
			System.out.println(values[i]);
		}
	}
}

Compiler output:
Main.java:3: error: class AOJ3_3 is public, should be declared in a file named AOJ3_3.java
public class AOJ3_3{
       ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int[] values = new int[w];
    for(int i=0;i<values.length;i++){
      values[i]=i+1;
    }
    for(int i=0;i<n;i++){
      String str = sc.next();
      String[] ab = str.split(",");
      int a = Integer.parseInt(ab[0]) - 1;
      int b = Integer.parseInt(ab[1]) - 1;
      int work;
      work = values[a];
      values[a] = values[b];
      values[b] = work;
    }
    for(int i=0;i<values.length;i++){
      System.out.println(values[i]);
  }
}

Compiler output:
Main.java:23: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int[] values = new int[w];
    for(int i=0;i<values.length;i++){
      values[i]=i+1;
    }
    for(int i=0;i<n;i++){
      String str = sc.next();
      String[] ab = str.split(",");
      int a = Integer.parseInt(ab[0]) - 1;
      int b = Integer.parseInt(ab[1]) - 1;
      int work;
      work = values[a];
      values[a] = values[b];
      values[b] = work;
    }
    for(int i=0;i<values.length;i++){
      System.out.println(values[i]);
    }
  }
}

Compiler output:
Main.java:6: error: cannot find symbol
    int[] values = new int[w];
                           ^
  symbol:   variable w
  location: class Main
Main.java:10: error: cannot find symbol
    for(int i=0;i<n;i++){
                  ^
  symbol:   variable n
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int w = sc.nextInt();
    int n = sc,nextInt();
    int[] values = new int[w];
    for(int i=0;i<values.length;i++){
      values[i]=i+1;
    }
    for(int i=0;i<n;i++){
      String str = sc.next();
      String[] ab = str.split(",");
      int a = Integer.parseInt(ab[0]) - 1;
      int b = Integer.parseInt(ab[1]) - 1;
      int work;
      work = values[a];
      values[a] = values[b];
      values[b] = work;
    }
    for(int i=0;i<values.length;i++){
      System.out.println(values[i]);
    }
  }
}

Compiler output:
Main.java:7: error: ';' expected
    int n = sc,nextInt();
                      ^
1 error
Language: Java

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
	// 標準入力からデータを読み込む準備
	Scanner sc = new Scanner(System.in);
	int w = sc.nextInt();
	int n = sc.nextInt();
	int[] values = new int[w];
	for (int i = 0; i < values.length; i++) {
	    values[i] = i + 1;
	}
	for (int i = 0; i < n; i++) {
	    String str = sc.next();
	    String[] ab = str.split(",");
	    int a = Integer.parseInt(ab[0]) - 1;
	    int b = Integer.parseInt(ab[1]) - 1;
	    // aとbを使ってvaluesを操作しよう
	    int c;
	    c=a;
	    a=b;
	    b=c;
	}
	// valuesを出力しよう
	for (i=0;i<n;i++){
	    System.out.println(values[i]);
	}
    }
}

Compiler output:
Main.java:24: error: cannot find symbol
	for (i=0;i<n;i++){
	     ^
  symbol:   variable i
  location: class Main
Main.java:24: error: cannot find symbol
	for (i=0;i<n;i++){
	         ^
  symbol:   variable i
  location: class Main
Main.java:24: error: cannot find symbol
	for (i=0;i<n;i++){
	             ^
  symbol:   variable i
  location: class Main
Main.java:25: error: cannot find symbol
	    System.out.println(values[i]);
	                              ^
  symbol:   variable i
  location: class Main
4 errors
Language: Java

import java.util.Scanner;

public class Draw{
	public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
	int w=sc.nextInt();
	int n=sc.nextInt();
	int[] values=new int[w];
	for(int i=0;i<values.length;i++){
	values[i]=i+1;
	}
	for(int i=0;i<n;i++){
	String str=sc.next();
	String[] ab=str.split(",");
	int a=Integer.parseInt(ab[0])-1;
	int b=Integer.parseInt(ab[1])-1;
	int c;
	c=values[a];
	values[a]=values[b];
	values[b]=c;
	}
	for(int i=0;i<values.length;i++){
		System.out.println(values[i]);
	}
	}
}

Compiler output:
Main.java:3: error: class Draw is public, should be declared in a file named Draw.java
public class Draw{
       ^
1 error
Language: Java

mport java.util.Scanner;

public class Main {
 public static void main(String[] args) { // ?¨??????\???????????????????????????????????????
  Scanner sc = new Scanner(System.in);
  int w = sc.nextInt();
  int n = sc.nextInt();
  int[] values = new int[w];
  for (int i = 0; i < values.length; i++) {
   values[i] = i + 1;
  }
  for (int i = 0; i < n; i++) {
   String str = sc.next();
   String[] ab = str.split(",");
   int a = Integer.parseInt(ab[0]) - 1;
   int b = Integer.parseInt(ab[1]) - 1; // a??¨b????????£???values??????????????????

   int c = values[a];
   values[a] = values[b];
   values[b] = c;
  }
  for (int i = 0; i < w; i++) {
   System.out.println(values[i]);
  }
 }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int blank;
int[] values = new int[w];
for (int i = 0; i < values.length; i++) {
values[i] = i + 1;
}
for (int i = 0; i < n; i++) {
String str = sc.next();
String[] ab = str.split(",");
int a = Integer.parseInt(ab[0]) - 1;
int b = Integer.parseInt(ab[1]) - 1;
blank=values[a];
values[a]=values[b];
values[b]=blank;// a??¨b????????£???values??????????????????
}
for(int i = 0; i < values.length; i++){
println(values[i]);// values??????????????????
}
}

Compiler output:
Main.java:25: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// ?¨??????\???????????????????????????????????????
Scanner sc = new Scanner(System.in);
int w = sc.nextInt();
int n = sc.nextInt();
int blank;
int[] values = new int[w];
for (int i = 0; i < values.length; i++) {
values[i] = i + 1;
}
for (int i = 0; i < n; i++) {
String str = sc.next();
String[] ab = str.split(",");
int a = Integer.parseInt(ab[0]) - 1;
int b = Integer.parseInt(ab[1]) - 1;
blank=values[a];
values[a]=values[b];
values[b]=blank;// a??¨b????????£???values??????????????????
}
for(int i = 0; i < values.length; i++){
println(values[i]);// values??????????????????
}
}
}

Compiler output:
Main.java:23: error: cannot find symbol
println(values[i]);// values??????????????????
^
  symbol:   method println(int)
  location: class Main
1 error
Language: Java

import java.io.*;
 
public class DrawLot{
    public static void main(String[] args){
        BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
        String s,t,u;
        int a,b,hako;
        hako=0;
        String[] abc=new String[2];
        int[] xyz=new int[2];
        try{
                s=reader.readLine();
                t=reader.readLine();
                a=Integer.parseInt(s);
                b=Integer.parseInt(t);
                int[] x=new int[a+1];
                x[0]=0;

                for(int j=1;j<(a+1);j++){
                    x[j]=j;
                }

                for(int i=0;i<b;i++){
                    u=reader.readLine();
                    abc=u.split(",");
                    for(int k=0;k<2;k++){
                        xyz[k]=Integer.parseInt(abc[k]);
                    }
                    hako=x[xyz[0]];;
                    x[xyz[0]]=x[xyz[1]];
                    x[xyz[1]]=hako;
                }

                for(int l=1;l<(a+1);l++){
                    System.out.println(x[l]);
                }
                
        }catch(IOException e){
            System.out.println(e);
        }
    }
}

Compiler output:
Main.java:3: error: class DrawLot is public, should be declared in a file named DrawLot.java
public class DrawLot{
       ^
1 error
Language: Java

import java.io.*;
 
public class main{
    public static void main(String[] args){
        BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
        String s,t,u;
        int a,b,hako;
        hako=0;
        String[] abc=new String[2];
        int[] xyz=new int[2];
        try{
                s=reader.readLine();
                t=reader.readLine();
                a=Integer.parseInt(s);
                b=Integer.parseInt(t);
                int[] x=new int[a+1];
                x[0]=0;

                for(int j=1;j<(a+1);j++){
                    x[j]=j;
                }

                for(int i=0;i<b;i++){
                    u=reader.readLine();
                    abc=u.split(",");
                    for(int k=0;k<2;k++){
                        xyz[k]=Integer.parseInt(abc[k]);
                    }
                    hako=x[xyz[0]];;
                    x[xyz[0]]=x[xyz[1]];
                    x[xyz[1]]=hako;
                }

                for(int l=1;l<(a+1);l++){
                    System.out.println(x[l]);
                }
                
        }catch(IOException e){
            System.out.println(e);
        }
    }
}

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main{
       ^
1 error
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// ?¨??????\??????????????????????????????????????????
Scanner sc = new Scanner(System.in); 
int w = sc.nextInt();
int n = sc.nextInt();
int j = 0, k = 0;

int[] a = new int[w + 1];
for (int i = 0; i <= w; i++) { 
a[i] = i;
}
for (int i = 1; i <= n; i++) {
String[] str = sc.next().split(".");
j = Integer.parseInt(s[0]);
k = Integer.parseInt(s[1]);
a[0] = a[j];
a[j] = a[k];
a[k] = a[0];
}
for(int i = 1; i <= w; i++){
System.out.printf("%d?\n", a[i]);
}
sc.close();

Compiler output:
Main.java:25: error: reached end of file while parsing
sc.close();
           ^
1 error
Language: Java

import java.util.Scanner;
public class DrawingLots {
public static void main(String[] args) {
// ?¨??????\??????????????????????????????????????????
Scanner sc = new Scanner(System.in); 
int w = sc.nextInt();
int n = sc.nextInt();
int j = 0, k = 0;

int[] a = new int[w + 1];
for (int i = 0; i <= w; i++) { 
a[i] = i;
}
for (int i = 1; i <= n; i++) {
String[] str = sc.next().split(".");
j = Integer.parseInt(s[0]);
k = Integer.parseInt(s[1]);
a[0] = a[j];
a[j] = a[k];
a[k] = a[0];
}
for(int i = 1; i <= w; i++){
System.out.printf("%d?\n", a[i]);
}
sc.close();

Compiler output:
Main.java:25: error: reached end of file while parsing
sc.close();
           ^
1 error
Language: Java

import java.util.Scanner;
public class DrawingLots {
public static void main(String[] args) {
// ?¨??????\??????????????????????????????????????????
Scanner sc = new Scanner(System.in); 
int w = sc.nextInt();
int n = sc.nextInt();
int j = 0, k = 0;

int[] a = new int[w + 1];
for (int i = 1; i <= w; i++) { 
a[i] = i;
}
for (int i = 1; i <= n; i++) {
String[] s = sc.next().split(".");
j = Integer.parseInt(s[0]);
k= Integer.parseInt(s[1]);
a[0] = a[j];
a[j] = a[k];
a[k] = a[0];
}
for( i = 1; i <= w; i++){
System.out.printf("%d?\n", a[i]);
}
sc.close();
}
}

Compiler output:
Main.java:2: error: class DrawingLots is public, should be declared in a file named DrawingLots.java
public class DrawingLots {
       ^
Main.java:22: error: cannot find symbol
for( i = 1; i <= w; i++){
     ^
  symbol:   variable i
  location: class DrawingLots
Main.java:22: error: cannot find symbol
for( i = 1; i <= w; i++){
            ^
  symbol:   variable i
  location: class DrawingLots
Main.java:22: error: cannot find symbol
for( i = 1; i <= w; i++){
                    ^
  symbol:   variable i
  location: class DrawingLots
Main.java:23: error: cannot find symbol
System.out.printf("%d?\n", a[i]);
                             ^
  symbol:   variable i
  location: class DrawingLots
5 errors
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// ?¨??????\??????????????????????????????????????????
Scanner sc = new Scanner(System.in); 
int w = sc.nextInt();
int n = sc.nextInt();
int j = 0, k = 0;

int[] a = new int[w + 1];
for (int i = 1; i <= w; i++) { 
a[i] = i;
}
for (int i = 1; i <= n; i++) {
String[] s = sc.next().split(".");
j = Integer.parseInt(s[0]);
k= Integer.parseInt(s[1]);
a[0] = a[j];
a[j] = a[k];
a[k] = a[0];
}
for( i = 1; i <= w; i++){
System.out.printf("%d\n", a[i]);
}
sc.close();
}
}

Compiler output:
Main.java:22: error: cannot find symbol
for( i = 1; i <= w; i++){
     ^
  symbol:   variable i
  location: class Main
Main.java:22: error: cannot find symbol
for( i = 1; i <= w; i++){
            ^
  symbol:   variable i
  location: class Main
Main.java:22: error: cannot find symbol
for( i = 1; i <= w; i++){
                    ^
  symbol:   variable i
  location: class Main
Main.java:23: error: cannot find symbol
System.out.printf("%d\n", a[i]);
                            ^
  symbol:   variable i
  location: class Main
4 errors
Language: Java

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        // ?¨??????\??????????????????????????????????????????                                    
        Scanner sc = new Scanner(System.in); int w = sc.nextInt();
        int n = sc.nextInt();
        int[] values = new int[w];
        for (int i = 0; i < values.length; i++) {
            values[i] = i + 1;
        }
        for (int i = 0; i < n; i++) {
            String str = sc.next();
            String[] ab = str.split(",");
            int a = Integer.parseInt(ab[0]) - 1;
            int b = Integer.parseInt(ab[1]) - 1;
            // a??¨b????????£???values??????????????????                                   
            int	c;
            c =	values[a];
            values[a] =	values[b];
            values[b] =	c;
        }
        // values??????????????????                                                   
-uuu:**-F1  Main.java      Top L1     (Java/l Abbrev)---------------------------

Compiler output:
Main.java:23: error: not a statement
-uuu:**-F1  Main.java      Top L1     (Java/l Abbrev)---------------------------
^
Main.java:23: error: ';' expected
-uuu:**-F1  Main.java      Top L1     (Java/l Abbrev)---------------------------
    ^
Main.java:23: error: ';' expected
-uuu:**-F1  Main.java      Top L1     (Java/l Abbrev)---------------------------
                ^
Main.java:23: error: ';' expected
-uuu:**-F1  Main.java      Top L1     (Java/l Abbrev)---------------------------
                              ^
Main.java:23: error: ')' or ',' expected
-uuu:**-F1  Main.java      Top L1     (Java/l Abbrev)---------------------------
                                             ^
Main.java:23: error: not a statement
-uuu:**-F1  Main.java      Top L1     (Java/l Abbrev)---------------------------
                                              ^
Main.java:23: error: ';' expected
-uuu:**-F1  Main.java      Top L1     (Java/l Abbrev)---------------------------
                                                    ^
Main.java:23: error: reached end of file while parsing
-uuu:**-F1  Main.java      Top L1     (Java/l Abbrev)---------------------------
                                                                                ^
8 errors
Language: Java

import java.io.*;
import java.util.*;
 
class Main{
public static void main(String[] args)throws IOException{
InputStreamReader isr =new InputStreamReader(System.in);
BufferedReader reader =new BufferedReader(isr);
String buf = reader.readLine();
int w = Integer.parseInt(buf);
buf = reader.readLine();
int n = Integer.parseInt(buf)i
nt i;
int[] num = new int[w];
for (i = 0;i < w;i++) {
num[i] = i + 1;
}
for (i = 0;i < n;i++) {
buf = reader.readLine();
StringTokenizer st = new StringTokenizer(buf,",");
int a = Integer.parseInt(st.nextToken());
int b = Integer.parseInt(st.nextToken());
int x = num[a - 1];
num[a - 1] = num[b - 1];
num[b - 1] = x;
}
for (i = 0;i < w;i++) System.out.println(num[i]);
}
}

Compiler output:
Main.java:11: error: ';' expected
int n = Integer.parseInt(buf)i
                             ^
Main.java:12: error: ';' expected
nt i;
  ^
Main.java:12: error: not a statement
nt i;
   ^
3 errors
Language: Java

import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

import static com.sun.org.apache.xalan.internal.lib.ExsltStrings.split;
import static java.lang.StrictMath.sqrt;
import static java.util.Collections.swap;

/**
 * Wrong Answer
 */
class Main {
	public static void main(String[] args) throws IOException {
		Scanner in = new Scanner(System.in);

		int w = in.nextInt();
		int n = in.nextInt();

		List<Integer> ans = new ArrayList<Integer>();
		for(int i=1;i<=w;i++) {
			ans.add(i);
		}

		String buf = in.nextLine();

		for(int i=0;i<n;i++) {
			String line = in.nextLine();
			String arr[] = line.split(",");
			int a = Integer.parseInt(arr[0]);
			int b = Integer.parseInt(arr[1]);
			swap(ans, a-1, b-1);
		}
		for(int i=0;i<ans.size();i++) {
			System.out.println(ans.get(i));
		}
	}
}

Compiler output:
Main.java:7: error: package com.sun.org.apache.xalan.internal.lib is not visible
import static com.sun.org.apache.xalan.internal.lib.ExsltStrings.split;
                                               ^
  (package com.sun.org.apache.xalan.internal.lib is declared in module java.xml, which does not export it)
Main.java:7: error: static import only from classes and interfaces
import static com.sun.org.apache.xalan.internal.lib.ExsltStrings.split;
^
2 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int w = scan.nextInt();
		int[] dl = new int[w];
		for(int i = 0; i < w; i++){
			dl[i] = i + 1;
		}
		int n = scan.nextInt();
		for(int i = 0; i < n; i++){
			String input = scan.nextLine();
			String[] nums = input.split("\\,");
			int a = Integer.parseInt(num[0]);
			int b = Integer.parseInt(num[1]);
			int work = dl[a - 1];
			dl[a - 1] = dl[b - 1];
			dl[b - 1] = work;
		}

		for(int i = 0; i < w; i++){
			System.out.printf("%d\n", dl[i]);
		}
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
			int a = Integer.parseInt(num[0]);
			                         ^
  symbol:   variable num
  location: class Main
Main.java:17: error: cannot find symbol
			int b = Integer.parseInt(num[1]);
			                         ^
  symbol:   variable num
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Vol0_11{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int w = scan.nextInt();
		int[] dl = new int[w];
		for(int i = 0; i < w; i++){
			dl[i] = i + 1;
		}
		int n = scan.nextInt();
		for(int i = 0; i < n; i++){
			String input = scan.nextLine();
			String[] nums = input.split(",");
			int a = Integer.parseInt(nums[0]);
			int b = Integer.parseInt(nums[1]);
			int work = dl[a - 1];
			dl[a - 1] = dl[b - 1];
			dl[b - 1] = work;
		}

		for(int i = 0; i < w; i++){
			System.out.printf("%d\n", dl[i]);
		}
	}
}

Compiler output:
Main.java:3: error: class Vol0_11 is public, should be declared in a file named Vol0_11.java
public class Vol0_11{
       ^
1 error
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int w = scan.nextInt();
		int n = scan.nextInt();
		int[] dl = new int[w];
		for(int i = 0; i < w; i++){
			dl[i] = i + 1;
		}
		for(int i = 0; i < n; i++){
			String \n = scan.nextLine();
			String input = scan.nextLine();
			String[] nums = input.split(",");
			int a = Integer.parseInt(nums[0]) - 1;
			int b = Integer.parseInt(nums[1]) - 1;
			int tmp = dl[a];
			dl[a] = dl[b];
			dl[b] = tmp;
		}
		for(int i = 0; i < w; i++){
			System.out.printf("%d\n", dl[i]);
		}
	}
}

Compiler output:
Main.java:14: error: illegal character: '\'
			String \n = scan.nextLine();
			       ^
Main.java:14: error: not a statement
			String \n = scan.nextLine();
			^
2 errors
Language: Java

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

public class DrawingLots {

    public static final int FIRST_NUMBER = 0;
    public static final int SECOND_NUMBER = 1;

    public static void main(String[] args) throws NumberFormatException, IOException {

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	// ???????????°
	int vertical = Integer.parseInt(br.readLine());
	// ?¨?????????°
	int horizontal = Integer.parseInt(br.readLine());

	// ?????????????????°??????????????????
	List<int[]> changeRequests = new ArrayList<>();
	for (int i = 0; i < horizontal; i++) {
	    String[] changeRequestStr = br.readLine().split(",");
	    int[] changeRequest = new int[2];
	    changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);
	    changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);
	    changeRequests.add(changeRequest);
	}

	// ?????\???????????????????´???????????????????????????????
	int[] outputArray = getDrawedArray(changeRequests, vertical, horizontal);

	// ???????????????????????????????????¨?????\???????????????????????????????????????1??????????????????
	for (int i = 1; i < outputArray.length; i++) {
	    System.out.println(outputArray[i]);
	}

    }

    /**
     * ?????? ?????????????´???????????????\??????????????????
     * 
     * @param changeRequests
     * @param vertical
     * @param horizontal
     * @return ?????\?????????
     */
    private static int[] getDrawedArray(List<int[]> changeRequests, int vertical, int horizontal) {
	// ?????\?????????????????????????????????????????????
	// outputArray[0]????????¨?????????
	int[] outputArray = new int[vertical + 1];
	for (int i = 1; i < outputArray.length; i++) {
	    outputArray[i] = i;
	}

	// ?????????????????????????£????????????\????????????
	for (int[] changeRequest : changeRequests) {
	    int mediator = 0;
	    mediator = outputArray[changeRequest[FIRST_NUMBER]];
	    outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];
	    outputArray[changeRequest[SECOND_NUMBER]] = mediator;

	}

	return outputArray;

    }

}

Compiler output:
Main.java:7: error: class DrawingLots is public, should be declared in a file named DrawingLots.java
public class DrawingLots {
       ^
1 error
Language: Java

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

public class DrawingLot {

    public static final int FIRST_NUMBER = 0;
    public static final int SECOND_NUMBER = 1;

    public static void main(String[] args) throws NumberFormatException, IOException {

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	// ???????????°
	int vertical = Integer.parseInt(br.readLine());
	// ?¨?????????°
	int horizontal = Integer.parseInt(br.readLine());

	// ???????????????????´?????????°??????????????????
	List<int[]> changeRequests = new ArrayList<>();
	for (int i = 0; i < horizontal; i++) {
	    String[] changeRequestStr = br.readLine().split(",");
	    int[] changeRequest = new int[2];
	    changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);
	    changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);
	    changeRequests.add(changeRequest);
	}

	// ?????\???????????????????´???????????????????????????????
	int[] outputArray = getDrawedArray(changeRequests, vertical, horizontal);

	// ???????????????????????????????????¨????????????????????????????????????1??????????????????
	for (int i = 1; i < outputArray.length; i++) {
	    System.out.println(outputArray[i]);
	}

    }

    /**
     * ?????? ???????????????????????????????????\??????????????????
     * 
     * @param changeRequests
     * @param vertical
     * @param horizontal
     * @return ?????\?????????
     */
    private static int[] getDrawedArray(List<int[]> changeRequests, int vertical, int horizontal) {
	// ?????\?????????????????????????????????????????????
	// ?????????????????????????????¨?????\????????????????????´???????????????outputArray[0]????????¨?????????
	int[] outputArray = new int[vertical + 1];
	for (int i = 1; i < outputArray.length; i++) {
	    outputArray[i] = i;
	}

	// ?????????????????????????£????????????\????????????
	for (int[] changeRequest : changeRequests) {
	    int mediator = 0;
	    mediator = outputArray[changeRequest[FIRST_NUMBER]];
	    outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];
	    outputArray[changeRequest[SECOND_NUMBER]] = mediator;

	}

	return outputArray;

    }

}

Compiler output:
Main.java:7: error: class DrawingLot is public, should be declared in a file named DrawingLot.java
public class DrawingLot {
       ^
1 error
Language: Java

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

public class DrawingLots {

    public static final int FIRST_NUMBER = 0;
    public static final int SECOND_NUMBER = 1;

    public static void main(String[] args) throws NumberFormatException, IOException {

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	// ???????????°
	int vertical = Integer.parseInt(br.readLine());
	// ?¨?????????°
	int horizontal = Integer.parseInt(br.readLine());

	// ???????????????????´?????????°??????????????????
	List<int[]> changeRequests = new ArrayList<>();
	for (int i = 0; i < horizontal; i++) {
	    String[] changeRequestStr = br.readLine().split(",");
	    int[] changeRequest = new int[2];
	    changeRequest[FIRST_NUMBER] = Integer.parseInt(changeRequestStr[FIRST_NUMBER]);
	    changeRequest[SECOND_NUMBER] = Integer.parseInt(changeRequestStr[SECOND_NUMBER]);
	    changeRequests.add(changeRequest);
	}

	// ?????\???????????????????´???????????????????????????????
	int[] outputArray = getDrawedArray(changeRequests, vertical, horizontal);

	// ???????????????????????????????????¨????????????????????????????????????1??????????????????
	for (int i = 1; i < outputArray.length; i++) {
	    System.out.println(outputArray[i]);
	}

    }

    /**
     * ?????? ???????????????????????????????????\??????????????????
     * 
     * @param changeRequests
     * @param vertical
     * @param horizontal
     * @return ?????\?????????
     */
    private static int[] getDrawedArray(List<int[]> changeRequests, int vertical, int horizontal) {
	// ?????\?????????????????????????????????????????????
	// ?????????????????????????????¨?????\????????????????????´???????????????outputArray[0]????????¨?????????
	int[] outputArray = new int[vertical + 1];
	for (int i = 1; i < outputArray.length; i++) {
	    outputArray[i] = i;
	}

	// ?????????????????????????£????????????\????????????
	for (int[] changeRequest : changeRequests) {
	    int mediator = 0;
	    mediator = outputArray[changeRequest[FIRST_NUMBER]];
	    outputArray[changeRequest[FIRST_NUMBER]] = outputArray[changeRequest[SECOND_NUMBER]];
	    outputArray[changeRequest[SECOND_NUMBER]] = mediator;

	}

	return outputArray;

    }

}

Compiler output:
Main.java:7: error: class DrawingLots is public, should be declared in a file named DrawingLots.java
public class DrawingLots {
       ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
 Scanner sc=new.Scanner(System.in);
  int w=0,n=0;
  int data[30];
  n=sc.nextInt();
  w=sc.nextInt();
  for(int i=0;i<n;i++){
   data[i]=i+1;
  }
  for(int j=0;j<w;j++){
   int a=sc.nextInt();
   int b=sc.nextInt();
   tmp=data[a-1];
   data[a-1]=data[b-1];
   data[b-1]=tmp;
  }
  for(int k=0;k<n;k++){
   System.out.println(data[k]);
  }
  }
  }

Compiler output:
Main.java:5: error: <identifier> expected
 Scanner sc=new.Scanner(System.in);
               ^
Main.java:7: error: ']' expected
  int data[30];
           ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
 Scanner sc=new.Scanner(System.in);
  int w=0,n=0;
  int[] data=new int[30];
  n=sc.nextInt();
  w=sc.nextInt();
  for(int i=0;i<n;i++){
   data[i]=i+1;
  }
  for(int j=0;j<w;j++){
   int a=sc.nextInt();
   int b=sc.nextInt();
   tmp=data[a-1];
   data[a-1]=data[b-1];
   data[b-1]=tmp;
  }
  for(int k=0;k<n;k++){
   System.out.println(data[k]);
  }
  }
  }

Compiler output:
Main.java:5: error: <identifier> expected
 Scanner sc=new.Scanner(System.in);
               ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
 Scanner sc=new Scanner(System.in);
  int w=0,n=0;
  int[] data=new int[30];
  n=sc.nextInt();
  w=sc.nextInt();
  for(int i=0;i<n;i++){
   data[i]=i+1;
  }
  for(int j=0;j<w;j++){
   int a=sc.nextInt();
   int b=sc.nextInt();
   tmp=data[a-1];
   data[a-1]=data[b-1];
   data[b-1]=tmp;
  }
  for(int k=0;k<n;k++){
   System.out.println(data[k]);
  }
  }
  }

Compiler output:
Main.java:16: error: cannot find symbol
   tmp=data[a-1];
   ^
  symbol:   variable tmp
  location: class Main
Main.java:18: error: cannot find symbol
   data[b-1]=tmp;
             ^
  symbol:   variable tmp
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class DrawLot{
 public static void main(String[] args){
 Scanner sc=new Scanner(System.in);
  int w=0,n=0;
  int[] data=new int[30];
  w=sc.nextInt();
  n=sc.nextInt();
  for(int i=0;i<w;i++){
   data[i]=i+1;
  }
  for(int j=0;j<n;j++){
   String ab=sc.next();
   int a=(int)ab.charAt(0)-(int)'0';
   int b=(int)ab.charAt(2)-(int)'0';
   int tmp=data[a-1];
   data[a-1]=data[b-1];
   data[b-1]=tmp;
  }
  for(int k=0;k<w;k++){
   System.out.println(data[k]);
  }
  }
  }

Compiler output:
Main.java:3: error: class DrawLot is public, should be declared in a file named DrawLot.java
public class DrawLot{
       ^
1 error
Language: Java

import java.util.Scanner;

public class DrawLot{
 public static void main(String[] args){
 Scanner sc=new Scanner(System.in);
 scanner.useDelimiter(",|\n")
  int w=0,n=0;
  int[] data=new int[30];
  w=sc.nextInt();
  n=sc.nextInt();
  for(int i=0;i<w;i++){
   data[i]=i+1;
  }
  for(int j=0;j<n;j++){
   a=sc.nextInt();
   b=sc.nextInt();
   int tmp=data[a-1];
   data[a-1]=data[b-1];
   data[b-1]=tmp;
  }
  for(int k=0;k<w;k++){
   System.out.println(data[k]);
  }
  }
}

Compiler output:
Main.java:6: error: ';' expected
 scanner.useDelimiter(",|\n")
                             ^
1 error
Language: Java

import java.util.Scanner;

public class DrawLot{
 public static void main(String[] args){
 Scanner sc=new Scanner(System.in);
 scanner.useDelimiter(",|\n");
  int w=0,n=0;
  int[] data=new int[30];
  w=sc.nextInt();
  n=sc.nextInt();
  for(int i=0;i<w;i++){
   data[i]=i+1;
  }
  for(int j=0;j<n;j++){
   a=sc.nextInt();
   b=sc.nextInt();
   int tmp=data[a-1];
   data[a-1]=data[b-1];
   data[b-1]=tmp;
  }
  for(int k=0;k<w;k++){
   System.out.println(data[k]);
  }
  }
}

Compiler output:
Main.java:3: error: class DrawLot is public, should be declared in a file named DrawLot.java
public class DrawLot{
       ^
Main.java:6: error: cannot find symbol
 scanner.useDelimiter(",|\n");
 ^
  symbol:   variable scanner
  location: class DrawLot
Main.java:15: error: cannot find symbol
   a=sc.nextInt();
   ^
  symbol:   variable a
  location: class DrawLot
Main.java:16: error: cannot find symbol
   b=sc.nextInt();
   ^
  symbol:   variable b
  location: class DrawLot
Main.java:17: error: cannot find symbol
   int tmp=data[a-1];
                ^
  symbol:   variable a
  location: class DrawLot
Main.java:18: error: cannot find symbol
   data[a-1]=data[b-1];
        ^
  symbol:   variable a
  location: class DrawLot
Main.java:18: error: cannot find symbol
   data[a-1]=data[b-1];
                  ^
  symbol:   variable b
  location: class DrawLot
Main.java:19: error: cannot find symbol
   data[b-1]=tmp;
        ^
  symbol:   variable b
  location: class DrawLot
8 errors
Language: Java

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
 Scanner sc=new Scanner(System.in);
 scanner.useDelimiter(",|\n");
  int w=0,n=0;
  int[] data=new int[30];
  w=sc.nextInt();
  n=sc.nextInt();
  for(int i=0;i<w;i++){
   data[i]=i+1;
  }
  for(int j=0;j<n;j++){
   int a=sc.nextInt();
   int b=sc.nextInt();
   int tmp=data[a-1];
   data[a-1]=data[b-1];
   data[b-1]=tmp;
  }
  for(int k=0;k<w;k++){
   System.out.println(data[k]);
  }
  }
}

Compiler output:
Main.java:6: error: cannot find symbol
 scanner.useDelimiter(",|\n");
 ^
  symbol:   variable scanner
  location: class Main
1 error