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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
 *
 * @author Y
 */

class saikoro{
    String a[];
    saikoro(String a){
        this.a = new String[6];
        this.a = a.split(" ");
    }
    
    void N(){
        this.a[0] = a[2]; this.a[2] = a[6]; this.a[3] = a[3];
        this.a[4] = a[4]; this.a[5] = a[1]; this.a[6] = a[5];
    }
    void S(){
        this.a[1] = a[5]; this.a[2] = a[1]; this.a[3]= a[3];
        this.a[4] = a[4]; this.a[5] = a[6]; this.a[6] = a[2];
    }
    void W(){
        this.a[1] = a[3]; this.a[2] = a[2]; this.a[3] = a[6];
        this.a[4] = a[1]; this.a[5] = a[5]; this.a[6] = a[4];
    }
    void E(){
        this.a[1] = a[4]; this.a[2] = a[2]; this.a[3] = a[1];
        this.a[4] = a[6]; this.a[5] = a[5]; this.a[6] = a[3];
    }
    String getS(int n){
        return this.a[n];
    }
}

public class Dice1 {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        saikoro d = new saikoro(str);
        str = br.readLine();
        
        for(int i = 0;i<str.length();i++){
            char c = str.charAt(i);
            switch(c){
                case 'N':
                    d.N();
                    break;
                case'S':
                    d.S();
                    break;
                case 'W':
                    d.W();
                    break;
                case 'E':
                    d.E();
                    break;
                default:
                    break;
            }
        }
        
        System.out.println(d.getS(0));
    }
}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
 
public class Test {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        Dice dice = new Dice(str);
        str = br.readLine();
        for(int i=0;i<str.length();i++){
            char c = str.charAt(i);
            switch(c){
                case 'S':
                    dice.moveS();
                    break;
                case 'W':
                    dice.moveW();
                    break;
                case 'E':
                    dice.moveE();
                    break;
                case 'N':
                    dice.moveN();
                    break;
                default:
                    break;
            }
        }
        System.out.println(dice.getStr(0));
    }
}
 
class Dice{
    private String str[];//0=???,1=???,2=???,3=???,4=??????,5=???
    private String tmp;
     
    Dice(String str) {
        this.str = new String[6];
        this.str = str.split(" ");
    }
     
    public String getStr(int n){
        return this.str[n];
    }
     
    void moveW(){
        tmp = this.str[0];
        this.str[0] = this.str[2];
        this.str[2] = this.str[5];
        this.str[5] = this.str[3];
        this.str[3] = tmp;
    }
     
    void moveE(){
        tmp = this.str[0];
        this.str[0] = this.str[3];
        this.str[3] = this.str[5];
        this.str[5] = this.str[2];
        this.str[2] = tmp;
    }
     
    void moveS(){
        tmp = this.str[0];
        this.str[0] = this.str[4];
        this.str[4] = this.str[5];
        this.str[5] = this.str[1];
        this.str[1] = tmp;
    }
     
    void moveN(){
        tmp = this.str[0];
        this.str[0] = this.str[1];
        this.str[1] = this.str[5];
        this.str[5] = this.str[4];
        this.str[4] = tmp;
    }
}

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

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int ravel[] = new int[6];
		for(int i = 0; i < 6; i++){
			ravel[i] = scan.nextInt();
		}
		scan.nextLine();
		String order = scan.nextLine();
		scan.close();
		Dice dice = new Dice(ravel);
		dice.Move(order);
		System.out.println(dice.ravel[0]);
	}
}
public class Dice {
	public int ravel[] = new int[6];

	public Dice(int[] _ravel) {
		ravel = _ravel;
	}

	public void Move(String order){
		char ch[] = order.toCharArray();
		for(int i = 0; i < ch.length; i++){
			MoveExec(ch[i]);
		}
	}

	private void MoveExec(char chOrder){
		int[] oldRavel = ravel.clone();
		switch(chOrder){
		case 'E':
			ravel[0] = oldRavel[3];
			ravel[3] = oldRavel[5];
			ravel[5] = oldRavel[2];
			ravel[2] = oldRavel[0];
			break;
		case 'N':
			ravel[0] = oldRavel[1];
			ravel[1] = oldRavel[5];
			ravel[5] = oldRavel[4];
			ravel[4] = oldRavel[0];
			break;
		case 'S':
			ravel[0] = oldRavel[4];
			ravel[4] = oldRavel[5];
			ravel[5] = oldRavel[1];
			ravel[1] = oldRavel[0];
			break;
		case 'W':
			ravel[0] = oldRavel[2];
			ravel[2] = oldRavel[5];
			ravel[5] = oldRavel[3];
			ravel[3] = oldRavel[0];
			break;
		}
	}
}

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

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Dice dice = new Dice(sc);
		sc.nextLine();
		String[] lines = sc.nextLine().split("");

		for(int i = 0;i < lines.length;i++) {
			if(lines[i].equals("N")) {
				dice.goNorth();
			} else if(lines[i].equals("S")) {
				dice.goSouth();
			} else if(lines[i].equals("E")) {
				dice.goEast();
			} else if(lines[i].equals("W")){
				dice.goWest();
			}
		}

		System.out.println(dice.getTop());


	}
}

	public class Dice {
	int top;
	int south;
	int east;
	int west;
	int north;
	int bottom;


	public Dice(Scanner sc) {
		this.top = sc.nextInt();
		this.south = sc.nextInt();
		this.east = sc.nextInt();
		this.west = sc.nextInt();
		this.north = sc.nextInt();
		this.bottom = sc.nextInt();
	}

	public void goNorth() {
		int t = this.top;
		int s = this.south;
		int e = this.east;
		int w = this.west;
		int n = this.north;
		int b = this.bottom;

		this.top = s;
		this.south = b;
		this.north = t;
		this.bottom = n;
	}

	public void goSouth() {
		int t = this.top;
		int s = this.south;
		int e = this.east;
		int w = this.west;
		int n = this.north;
		int b = this.bottom;

		this.top = n;
		this.south = t;
		this.north = b;
		this.bottom = s;
	}

	public void goEast() {
		int t = this.top;
		int s = this.south;
		int e = this.east;
		int w = this.west;
		int n = this.north;
		int b = this.bottom;

		this.top = w;
		this.east = t;
		this.west = b;
		this.bottom = e;
	}

	public void goWest() {
		int t = this.top;
		int s = this.south;
		int e = this.east;
		int w = this.west;
		int n = this.north;
		int b = this.bottom;

		this.top = e;
		this.east = b;
		this.west = t;
		this.bottom = w;
	}

	public int getTop() {
		return this.top;
	}

}

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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();

		int[] dice1 = Dice.Diceget(line1);

		String line2 = sc.nextLine();

		for (int i = 0; i < line2.length(); i++) {
			char c = line2.charAt(i);
			if (String.valueOf(c).equals("E")) {
				dice1 = Dice.DiceE(dice1);
			} else if (String.valueOf(c).equals("N")) {
				dice1 = Dice.DiceN(dice1);
			} else if (String.valueOf(c).equals("S")) {
				dice1 = Dice.DiceS(dice1);
			} else if (String.valueOf(c).equals("W")) {
				dice1 = Dice.DiceW(dice1);
			}

		}
		System.out.println(dice1[1]);

	}
}

public class Dice {
	public static int[] Diceget(String line) {
		int[] set = new int[7];
		String[] s = line.split(" ");
		for (int i = 1; i <= 6; i++) {
			set[i] = Integer.parseInt(s[i-1]);
		}
		return set;
	}

	public static int[] DiceE(int[] d){
		int[] dd = new int[7];
		dd[1] = d[4];
		dd[2] = d[2];
		dd[3] = d[1];
		dd[4] = d[6];
		dd[5] = d[5];
		dd[6] = d[3];
		return dd;
	}

	public static int[] DiceN(int[] d){
		int[] dd = new int[7];
		dd[1] = d[2];
		dd[2] = d[6];
		dd[3] = d[3];
		dd[4] = d[4];
		dd[5] = d[1];
		dd[6] = d[5];
		return dd;
	}

	public static int[] DiceS(int[] d){
		int[] dd = new int[7];
		dd[1] = d[5];
		dd[2] = d[1];
		dd[3] = d[3];
		dd[4] = d[4];
		dd[5] = d[6];
		dd[6] = d[2];
		return dd;
	}

	public static int[] DiceW(int[] d){
		int[] dd = new int[7];
		dd[1] = d[3];
		dd[2] = d[2];
		dd[3] = d[6];
		dd[4] = d[1];
		dd[5] = d[5];
		dd[6] = d[4];
		return dd;
	}
}

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

import java.util.Scanner;

public class MainDice
{

	public static void main(String[] args)
	{
		// TODO ?????????????????????????????????????????????
		Scanner sc = new Scanner(System.in);
		String[] inputValue = sc.nextLine().split(" ");
		String[] inputDirection = sc.nextLine().split("");
		MainDice instance = new MainDice();
		Dice dice = instance.new Dice(inputValue);

		for (String s : inputDirection)
		{
			switch (s)
			{
				case "N":
					dice.moveNourth();
					break;

				case "S":
					dice.moveSourth();
					break;

				case "E":
					dice.moveEast();
					break;

				case "W":
					dice.moveWest();
					break;
			}
		}

		System.out.println(dice.getTop());

	}

	public class Dice
	{
		public int[] Array = new int[6];
		private int tmp;

		public Dice(String[] num)
		{
			for (int i = 0; i < 6; ++i)
				this.Array[i] = Integer.parseInt(num[i]);
		}

		// ??????????????????????????????
		public void moveWest()
		{
			this.tmp = this.Array[0];
			this.Array[0] = this.Array[2];
			this.Array[2] = this.Array[5];
			this.Array[5] = this.Array[3];
			this.Array[3] = this.tmp;
		}

		// ??????????????????????????????
		public void moveNourth()
		{
			this.tmp = this.Array[0];
			this.Array[0] = this.Array[1];
			this.Array[1] = this.Array[5];
			this.Array[5] = this.Array[4];
			this.Array[4] = this.tmp;
		}

		// ??????????????????????????????
		public void moveEast()
		{
			this.tmp = this.Array[0];
			this.Array[0] = this.Array[3];
			this.Array[3] = this.Array[5];
			this.Array[5] = this.Array[2];
			this.Array[2] = this.tmp;
		}

		// ?????????????????????????????????
		public void moveSourth()
		{
			this.tmp = this.Array[0];
			this.Array[0] = this.Array[4];
			this.Array[4] = this.Array[5];
			this.Array[5] = this.Array[1];
			this.Array[1] = this.tmp;
		}

		public int getTop()
		{
			return this.Array[0];
		}
	}

}

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

class Main
{

	public static void main(String[] args) throws Exception
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] inputValue = br.readLine().split(" ");
		String[] inputDirection = br.readLine().split("");
		Dice dice = new Dice(inputValue);

		for (String s : inputDirection)
		{
			switch (s)
			{
				case "N":
					dice.moveNourth();
					break;

				case "S":
					dice.moveSourth();
					break;

				case "E":
					dice.moveEast();
					break;

				case "W":
					dice.moveWest();
					break;
			}
		}

		System.out.println(dice.getTop());

	}

}

class Dice
{
	public int[] Array = new int[6];
	private int tmp;

	public Dice(String[] num)
	{
		for (int i = 0; i < 6; ++i)
			this.Array[i] = Integer.parseInt(num[i]);
	}

	// ??????????????????????????????
	public void moveWest()
	{
		this.tmp = this.Array[0];
		this.Array[0] = this.Array[2];
		this.Array[2] = this.Array[5];
		this.Array[5] = this.Array[3];
		this.Array[3] = this.tmp;
	}

	// ??????????????????????????????
	public void moveNourth()
	{
		this.tmp = this.Array[0];
		this.Array[0] = this.Array[1];
		this.Array[1] = this.Array[5];
		this.Array[5] = this.Array[4];
		this.Array[4] = this.tmp;
	}

	// ??????????????????????????????
	public void moveEast()
	{
		this.tmp = this.Array[0];
		this.Array[0] = this.Array[3];
		this.Array[3] = this.Array[5];
		this.Array[5] = this.Array[2];
		this.Array[2] = this.tmp;
	}

	// ?????????????????????????????????
	public void moveSourth()
	{
		this.tmp = this.Array[0];
		this.Array[0] = this.Array[4];
		this.Array[4] = this.Array[5];
		this.Array[5] = this.Array[1];
		this.Array[1] = this.tmp;
	}

	public int getTop()
	{
		return this.Array[0];
	}
}

Compiler output:
Main.java:6: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:6: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:6: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
3 errors
Language: Java

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] line = sc.nextLine().split(" ");

        int[] data = new int[line.length];
        for (int i = 0; i < data.length; i++) {
        	data[i] = Integer.parseInt(line[i]);
		}

        Dice dice = new Dice(data);

        char[] moveData = sc.nextLine().toCharArray();
        for (int i = 0; i < moveData.length; i++) {
        	dice.move(moveData[i]);
        }

        System.out.println(dice.getTop());
        sc.close();
    }
}

public class Dice {
	private int top;
	private int bottom;
	private int left;
	private int right;
	private int front;
	private int back;


	Dice(int[] data) {
		this.top    = data[1 - 1];
		this.bottom = data[6 - 1];
		this.left   = data[4 - 1];
		this.right  = data[3 - 1];
		this.front  = data[2 - 1];
		this.back   = data[5 - 1];
	}

	public void move(char m) {
		int temp = -1;
		switch (m) {
		case 'N':
			temp = this.top;
			this.top    = this.front;
			this.front  = this.bottom;
			this.bottom = this.back;
			this.back   = temp;

			break;

		case 'E':
			temp = this.top;
			this.top    = this.left;
			this.left   = this.bottom;
			this.bottom = this.right;
			this.right  = temp;

			break;

		case 'W':
			temp = this.top;
			this.top    = this.right;
			this.right  = this.bottom;
			this.bottom = this.left;
			this.left   = temp;

			break;

		case 'S':
			temp = this.top;
			this.top    = this.back;
			this.back   = this.bottom;
			this.bottom = this.front;
			this.front  = temp;

			break;
		}
	}

	public int getTop() {
		return this.top;
	}
}

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

import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		String[] line = br.readLine().split(" ");

		int[] data = new int[line.length()];
		for(int i = 0; i < data.length; i++){
			data[i] = Interger.parseInt(line[i]);
		}

		Dice dice = new Dice(data);

		char[] m = br.readLine().toCharArray();
		for(int i = 0; i < m.length(); i++){
			dice.move(m[i]);
		}

		System.out.println(dice.getTop());

		class Dice{
			private int top;
			private int front;
			private int right;
			private int back;
			private int left;
			private int bottom;
			
			public Dice(int[] data){
				this.top = data[0];
				this.front = data[1];
				this.right = data[2];
				this.back = data[3];
				this.left = data[4];
				this.bottom = data[5];
			}

			public void move(char m){
				int temp = -1;
				switch(m){
					case 'N':
						temp = this.top;
						this.top = this.front;
						this.front = this.bottom;
						this.bottom = this.back;
						this.back = temp;
						break;

					case 'E':
						temp = this.top;
						this.top = this.left;
						this.left = this.bottom;
						this.bottom = this.right;
						this.right = temp;
						break;

					case 'S':
						temp = this.top;
						this.top = this.back;
						this.back = this.bottom;
						this.bottom = this.front;
						this.front = temp;
						break;

					case 'W':
						temp = this.top;
						this.top = this.right;
						this.right = this.bottom;
						this.bottom = this.left;
						this.left = temp;
						break;
				}
			}

			public int getTop(){
				return this.top;
			}
		}
	}
}

Compiler output:
Main.java:10: error: cannot find symbol
		int[] data = new int[line.length()];
		                         ^
  symbol:   method length()
  location: variable line of type String[]
Main.java:12: error: cannot find symbol
			data[i] = Interger.parseInt(line[i]);
			          ^
  symbol:   variable Interger
  location: class Main
Main.java:15: error: cannot find symbol
		Dice dice = new Dice(data);
		^
  symbol:   class Dice
  location: class Main
Main.java:15: error: cannot find symbol
		Dice dice = new Dice(data);
		                ^
  symbol:   class Dice
  location: class Main
Main.java:18: error: cannot find symbol
		for(int i = 0; i < m.length(); i++){
		                    ^
  symbol:   method length()
  location: variable m of type char[]
5 errors
Language: Java

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

public class Dice_I_40 {

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

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

		String first_lines = input.readLine();

		// ??\????????????????????????????´???????

		Dice insdice = new Dice(first_lines.split(" "));

		String second_lines = input.readLine();

		second_lines.toCharArray();

		insdice.dice_roll(second_lines.toCharArray());

		System.out.println(insdice.get_top());

	}
}

class Dice {

	int[] array_dice = new int[6];

	int top = 0;

	int bottom = 0;

	int front = 0;

	int back = 0;

	int right = 0;

	int left = 0;

	int num;

	// ????????????????????????????????£????????????????????\????????????????????§???????????§?????????
	Dice(String[] strings) {

			this.top=Integer.parseInt(strings[0]);

			this.front=Integer.parseInt(strings[1]);

			this.right=Integer.parseInt(strings[2]);

			this.left=Integer.parseInt(strings[3]);

			this.back=Integer.parseInt(strings[4]);

			this.bottom=Integer.parseInt(strings[5]);

			}

	void dice_roll(char []direction){

		      for(int direction_spot=0;direction_spot<direction.length; direction_spot++){

		    	  if(direction[direction_spot]=='N'){

		    		  num=top;

		    		  top=front;

		    		  front=bottom;

		    		  bottom=back;

		    		  back=num;
		    	  }else if(direction[direction_spot]=='S'){

		    		  num=top;

		    		  top=back;

		    		  back=bottom;

		    		  bottom=front;

		    		  front=num;

		    	  }else if(direction[direction_spot]=='E'){

		    		  num=top;

		    		  top=left;

		    		  left=bottom;

		    		  bottom=right;

		    		  right=num;

		    	  }else{

		    		  num=top;

		    		  top=right;

		    		  right=bottom;

		    		  bottom=left;

		    		  left=num;

		    	  }

		      }



	}

	int get_top(){

		return top;

	}
}

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

import java.util.*;

public class Main{
	public static void Main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int[] num=new num[6];
		for(int i=0;i<6;i++){
			num[i]=Integer.parseInt(line[i]);
		}
		Dice dice = new Dice(num);
		String str=sc.nextLine();
		for(int i=0;i<str.length();i++){
			if(str.charAt(i)=='W'){
				dice.moveW();
			}else if(str.charAt(i)=='S'){
				dice.moveS();
			}else if(str.charAt(i)=='E'){
				dice.moveE();
			}else if(str.charAt(i)=='N'){
				dice.moveN();
			}
		}
		System.out.println(dice.getUpper());
	}
}

public class Dice{
//
	private int lavel1,lavel2,lavel3,lavel4,lavel5,lavel6;
	private int w,s,e,n;
	private int upper,lower;
//	
	Dice(int in1,in2,in3,in4,in5,in6){
		lavel1=in1;
		lavel2=in2;
		lavel3=in3;
		lavel4=in4;
		lavel5=in5;
		lavel6=in6;
		
		w=lavel4;
		s=lavel2;
		e=lavel3;
		n=lavel5;
		
		upper=lavel1;
		lower=lavel6;
	}
	Dice(int[] i){
		lavel1=i[1];
		lavel2=i[2];
		lavel3=i[3];
		lavel4=i[4];
		lavel5=i[5];
		lavel6=i[6];
		
		w=lavel4;
		s=lavel2;
		e=lavel3;
		n=lavel5;
		
		upper=lavel1;
		lower=lavel6;
	}
	
	public int getUpper(){
		return upper;
	}
	
	public void moveW(){
		int i=lower;
		lower=w;
		w=upper;
		upper=e;
		e=i;
	}
	public void moveS(){
		int i=lower;
		lower=s;
		s=upper;
		upper=n;
		n=i;
	}
	public void moveE(){
		int i=lower;
		lower=e;
		e=upper;
		upper=w;
		w=i;
	}
	public void moveN(){
		int i=lower;
		lower=n;
		n=upper;
		upper=s;
		s=i;
	}
}

Compiler output:
Main.java:34: error: <identifier> expected
	Dice(int in1,in2,in3,in4,in5,in6){
	                ^
Main.java:34: error: <identifier> expected
	Dice(int in1,in2,in3,in4,in5,in6){
	                    ^
Main.java:34: error: <identifier> expected
	Dice(int in1,in2,in3,in4,in5,in6){
	                        ^
Main.java:34: error: <identifier> expected
	Dice(int in1,in2,in3,in4,in5,in6){
	                            ^
Main.java:34: error: <identifier> expected
	Dice(int in1,in2,in3,in4,in5,in6){
	                                ^
5 errors
Language: Java

import java.util.*;

public class Main{
	public static void Main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int[] num=new num[6];
		for(int i=0;i<6;i++){
			num[i]=Integer.parseInt(line[i]);
		}
		Dice dice = new Dice(num);
		String str=sc.nextLine();
		for(int i=0;i<str.length();i++){
			if(str.charAt(i)=='W'){
				dice.moveW();
			}else if(str.charAt(i)=='S'){
				dice.moveS();
			}else if(str.charAt(i)=='E'){
				dice.moveE();
			}else if(str.charAt(i)=='N'){
				dice.moveN();
			}
		}
		System.out.println(dice.getUpper());
	}
}

public class Dice{
//
	private int lavel1,lavel2,lavel3,lavel4,lavel5,lavel6;
	private int w,s,e,n;
	private int upper,lower;
//	
	Dice(int[] i){
		lavel1=i[1];
		lavel2=i[2];
		lavel3=i[3];
		lavel4=i[4];
		lavel5=i[5];
		lavel6=i[6];
		
		w=lavel4;
		s=lavel2;
		e=lavel3;
		n=lavel5;
		
		upper=lavel1;
		lower=lavel6;
	}
	
	public int getUpper(){
		return upper;
	}
	
	public void moveW(){
		int i=lower;
		lower=w;
		w=upper;
		upper=e;
		e=i;
	}
	public void moveS(){
		int i=lower;
		lower=s;
		s=upper;
		upper=n;
		n=i;
	}
	public void moveE(){
		int i=lower;
		lower=e;
		e=upper;
		upper=w;
		w=i;
	}
	public void moveN(){
		int i=lower;
		lower=n;
		n=upper;
		upper=s;
		s=i;
	}
}

Compiler output:
Main.java:28: error: class Dice is public, should be declared in a file named Dice.java
public class Dice{
       ^
Main.java:7: error: cannot find symbol
		int[] num=new num[6];
		              ^
  symbol:   class num
  location: class Main
2 errors
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int num[] = new int[6];
		for(int i=0;i<6;i++){
			num[i]=Integer.parseInt(line[i]);
		}
		int q = Integer.parseInt(sc.nextLine());
		Dice dice = new Dice(num);
		
		for(int i=0;i<q;i++){
			line= sc.nextLine.split(" ");
			int upper = Integer.parseInt(line[0]);
			int s = Integer.parseInt(line[1]);
			
			if(dice.getLower()==s){
				dice.moveN();
			}else if(dice.getN()==s){
				dice.moveN();
				dice.moveN();
			}else if(dice.getE()==s){
				dice.moveE();
				dice.moveN();
			}else if(dice.getW()==s){
				dice.moveW();
				dice.moveN();
			}else if(dice.getUpper()==s){
				dice.moveS();
			}
			
			if(dice.getLower()==upper){
				dice.moveW();
				dice.moveW();
			}else if(dice.getW()==upper){
				dice.moveE();
			}else if(dice.getE()==upper){
				dice.moveW();
			}
			
			System.out.println(dice.getE());
		}
	}
}
	Dice(int[] i){
		lavel1=i[0];
		lavel2=i[1];
		lavel3=i[2];
		lavel4=i[3];
		lavel5=i[4];
		lavel6=i[5];
		
		w=lavel4;
		s=lavel2;
		e=lavel3;
		n=lavel5;
		
		upper=lavel1;
		lower=lavel6;
	}
	
	public int getUpper(){
		return upper;
	}
	public int getW(){
		return w;
	}
	public int getS(){
		return s;
	}
	public int getE(){
		return e;
	}
	public int getN(){
		return n;
	}
	public int getLower(){
		return lower;
	}
	
	public void moveW(){
		int i=lower;
		lower=w;
		w=upper;
		upper=e;
		e=i;
	}
	public void moveS(){
		int i=lower;
		lower=s;
		s=upper;
		upper=n;
		n=i;
	}
	public void moveE(){
		int i=lower;
		lower=e;
		e=upper;
		upper=w;
		w=i;
	}
	public void moveN(){
		int i=lower;
		lower=n;
		n=upper;
		upper=s;
		s=i;
	}
}

Compiler output:
Main.java:47: error: class, interface, enum, or record expected
	Dice(int[] i){
	^
Main.java:49: error: class, interface, enum, or record expected
		lavel2=i[1];
		^
Main.java:50: error: class, interface, enum, or record expected
		lavel3=i[2];
		^
Main.java:51: error: class, interface, enum, or record expected
		lavel4=i[3];
		^
Main.java:52: error: class, interface, enum, or record expected
		lavel5=i[4];
		^
Main.java:53: error: class, interface, enum, or record expected
		lavel6=i[5];
		^
Main.java:55: error: class, interface, enum, or record expected
		w=lavel4;
		^
Main.java:56: error: class, interface, enum, or record expected
		s=lavel2;
		^
Main.java:57: error: class, interface, enum, or record expected
		e=lavel3;
		^
Main.java:58: error: class, interface, enum, or record expected
		n=lavel5;
		^
Main.java:60: error: class, interface, enum, or record expected
		upper=lavel1;
		^
Main.java:61: error: class, interface, enum, or record expected
		lower=lavel6;
		^
Main.java:62: error: class, interface, enum, or record expected
	}
	^
Main.java:64: error: unnamed classes are a preview feature and are disabled by default.
	public int getUpper(){
	       ^
  (use --enable-preview to enable unnamed classes)
Main.java:111: error: class, interface, enum, or record expected
}
^
15 errors
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		int num[] = new int[6];
		for(int i=0;i<6;i++){
			num[i]=Integer.parseInt(line[i]);
		}
		int q = Integer.parseInt(sc.nextLine());
		Dice dice = new Dice(num);
		
		for(int i=0;i<q;i++){
			line= sc.nextLine.split(" ");
			int upper = Integer.parseInt(line[0]);
			int s = Integer.parseInt(line[1]);
			
			if(dice.getLower()==s){
				dice.moveN();
			}else if(dice.getN()==s){
				dice.moveN();
				dice.moveN();
			}else if(dice.getE()==s){
				dice.moveE();
				dice.moveN();
			}else if(dice.getW()==s){
				dice.moveW();
				dice.moveN();
			}else if(dice.getUpper()==s){
				dice.moveS();
			}
			
			if(dice.getLower()==upper){
				dice.moveW();
				dice.moveW();
			}else if(dice.getW()==upper){
				dice.moveE();
			}else if(dice.getE()==upper){
				dice.moveW();
			}
			
			System.out.println(dice.getE());
		}
	}
}
class Dice{
//
	private final int lavel1,lavel2,lavel3,lavel4,lavel5,lavel6;
	private int w,s,e,n;
	private int upper,lower;
//	
	Dice(int[] i){
		lavel1=i[0];
		lavel2=i[1];
		lavel3=i[2];
		lavel4=i[3];
		lavel5=i[4];
		lavel6=i[5];
		
		w=lavel4;
		s=lavel2;
		e=lavel3;
		n=lavel5;
		
		upper=lavel1;
		lower=lavel6;
	}
	
	public int getUpper(){
		return upper;
	}
	public int getW(){
		return w;
	}
	public int getS(){
		return s;
	}
	public int getE(){
		return e;
	}
	public int getN(){
		return n;
	}
	public int getLower(){
		return lower;
	}
	
	public void moveW(){
		int i=lower;
		lower=w;
		w=upper;
		upper=e;
		e=i;
	}
	public void moveS(){
		int i=lower;
		lower=s;
		s=upper;
		upper=n;
		n=i;
	}
	public void moveE(){
		int i=lower;
		lower=e;
		e=upper;
		upper=w;
		w=i;
	}
	public void moveN(){
		int i=lower;
		lower=n;
		n=upper;
		upper=s;
		s=i;
	}
}

Compiler output:
Main.java:15: error: cannot find symbol
			line= sc.nextLine.split(" ");
			        ^
  symbol:   variable nextLine
  location: variable sc of type 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[] array = new int[6];
        for(int i = 0; i < 6; i++){
            array[i] = nextInt();
        }
        String str = sc.next();
        for(int i = 0; i < str.length(); i++){
            char c = str.charAt(i);
            int temp = 0;
            if(c == 'E'){
                temp = array[5];
                array[5] = array[2];
                array[2] = array[0];
                array[0] = array[3];
                array[3] = temp;
            }else if(c == 'W'){
                temp = array[0];
                array[0] = array[2];
                array[2] = array[5];
                array[5] = array[3];
                array[3] = array[0];
            }else if(c == 'N'){
                temp = array[0];
                array[0] = array[1];
                array[1] = array[5];
                array[5] = array[4];
                array[4] = temp;
            }else{
                temp = array[0];
                array[0] = array[4];
                array[4] = array[5];
                array[5] = array[1];
                array[1] = temp;
            }
        }
        System.out.println(array[0]);
    }
}


Compiler output:
Main.java:8: error: cannot find symbol
            array[i] = nextInt();
                       ^
  symbol:   method nextInt()
  location: class Main
1 error
Language: Java

import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
                    
        str = br.readLine();
        String[] nums = str.split("\\s");
        int[] temp = new int[6];
        for(int i=0;i<6;i++){
            temp[i] = Integer.parseInt(nums[i]);
        }

        Dice D = new Dice(temp[0],temp[5],temp[1],temp[3],temp[2],temp[4]);
        str = br.readLine();
        String[] rolls = str.split("");                    
        for(int i=0;i<rolls.length;i++){
            if(rolls[i].equals("S")){
                D.RollS(); 
            }else if(rolls[i].equals("W")){
                D.RollW();
            }else if(rolls[i].equals("E")){
                D.RollE();
            }else{
                D.RollN();
            }
        }
        System.out.println(D.top);

        br.close();
    }

    class Dice{
        int top;
        int bottom;
        int S;
        int W;
        int E;
        int N;
        
        Dice(int a,int b, int c,int d,int e,int f){
            this.top = a;
            this.bottom = b;
            this.S = c;
            this.W = d;
            this.E = e;
            this.N = f;
        }

        public void RollS(){
            //W = W;
            //E = E; 
            int tmp = this.bottom;
            this.bottom = this.S;
            this.S = this.top;
            this.top = this.N;
            this.N = tmp;
        }

        public void RollW(){
            //this.S = S;
            //this.N = N;
            int tmp =this.top;
            this.top = this.E;
            this.E = this.bottom;
            this.bottom = this.W;
            this.W = tmp;
        }
       
        public void RollE(){
            int tmp = this.top;
            this.top = this.W;
            this.W = this.bottom;
            this.bottom = this.E;
            this.E = tmp;
       }

       public void RollN(){
            int tmp = this.top;
            this.top = this.S;
            this.S = this.bottom;
            this.bottom = this.N;
            this.N = tmp;
       }
    }


}



Compiler output:
Main.java:16: error: non-static variable this cannot be referenced from a static context
        Dice D = new Dice(temp[0],temp[5],temp[1],temp[3],temp[2],temp[4]);
                 ^
1 error
Language: Java

import java.io.*;
import java.util.*;

public class Main{
    class Dice{
        int top;
        int bottom;
        int S;
        int W;
        int E;
        int N;
        
        Dice(int a,int b, int c,int d,int e,int f){
            this.top = a;
            this.bottom = b;
            this.S = c;
            this.W = d;
            this.E = e;
            this.N = f;
        }

        public void RollS(){
            //W = W;
            //E = E; 
            int tmp = this.bottom;
            this.bottom = this.S;
            this.S = this.top;
            this.top = this.N;
            this.N = tmp;
        }

        public void RollW(){
            //this.S = S;
            //this.N = N;
            int tmp =this.top;
            this.top = this.E;
            this.E = this.bottom;
            this.bottom = this.W;
            this.W = tmp;
        }
       
        public void RollE(){
            int tmp = this.top;
            this.top = this.W;
            this.W = this.bottom;
            this.bottom = this.E;
            this.E = tmp;
       }

       public void RollN(){
            int tmp = this.top;
            this.top = this.S;
            this.S = this.bottom;
            this.bottom = this.N;
            this.N = tmp;
       }
    }

    
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
                    
        str = br.readLine();
        String[] nums = str.split("\\s");
        int[] temp = new int[6];
        for(int i=0;i<6;i++){
            temp[i] = Integer.parseInt(nums[i]);
        }

        Dice D = new Dice(temp[0],temp[5],temp[1],temp[3],temp[2],temp[4]);
        str = br.readLine();
        String[] rolls = str.split("");                    
        for(int i=0;i<rolls.length;i++){
            if(rolls[i].equals("S")){
                D.RollS(); 
            }else if(rolls[i].equals("W")){
                D.RollW();
            }else if(rolls[i].equals("E")){
                D.RollE();
            }else{
                D.RollN();
            }
        }
        System.out.println(D.top);

        br.close();
    }
}


Compiler output:
Main.java:71: error: non-static variable this cannot be referenced from a static context
        Dice D = new Dice(temp[0],temp[5],temp[1],temp[3],temp[2],temp[4]);
                 ^
1 error
Language: Java

import java.util.Scanner;

class Dice{
  int Top;
  int Bottom;
  int N;
  int S;
  int W;
  int E;
  Dice (int Top, int Bottom, int N, int S, int W, int E){
    Top = this.Top, Bottom = this.Bottom, N = this.N, S = this.S, W = this.W, E = this.E
  }
  public void turnN(){
    int tmp = Top;
    Top = S;
    S = Bottom;
    Bottom = W;
    N = tmp;
  }
  public void TurnW() {
    int tmp = Top;
    Top = E;
    E = Bottom;
    Bottom = W;
    W = tmp;
  }
  public void TurnE() {
    int tmp = Top;
    Top = W;
    W = Bottom;
    Bottom = E;
    E = tmp;
  }
  public void TurnS() {
    int tmp = Top;
    Top = N;
    N = Bottom;
    Bottom = S;
    S = tmp;
  }
}

class Main{
  public static void main(String[] args){
    Scanner stdIn = new Scanner(System.in);
    Dice dice = new Dice(stdIn.nextInt(),stdIn.nextInt(),stdIn.nextInt(),stdIn.nextInt(),stdIn.nextInt(),stdIn.nextInt());
    String direction = stdIn.next();
    for (int i = 0; i < direction.length; i++){
      if (direction.chaAt(i) == 'N'){
        dice.turnN();
      }
      else if (direction.charAt(i) == 'W'){
        dice.turnW();
      }
      else if (direction.charAt(i) == 'E'){
        dice.turnE();
      }
      else {
        dice.turnS();
      }
    }
    System.out.println(dice.Top);
  }
}



Compiler output:
Main.java:11: error: ';' expected
    Top = this.Top, Bottom = this.Bottom, N = this.N, S = this.S, W = this.W, E = this.E
                  ^
Main.java:11: error: ';' expected
    Top = this.Top, Bottom = this.Bottom, N = this.N, S = this.S, W = this.W, E = this.E
                                        ^
Main.java:11: error: ';' expected
    Top = this.Top, Bottom = this.Bottom, N = this.N, S = this.S, W = this.W, E = this.E
                                                    ^
Main.java:11: error: ';' expected
    Top = this.Top, Bottom = this.Bottom, N = this.N, S = this.S, W = this.W, E = this.E
                                                                ^
Main.java:11: error: ';' expected
    Top = this.Top, Bottom = this.Bottom, N = this.N, S = this.S, W = this.W, E = this.E
                                                                            ^
Main.java:11: error: ';' expected
    Top = this.Top, Bottom = this.Bottom, N = this.N, S = this.S, W = this.W, E = this.E
                                                                                        ^
6 errors
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner stdIn = new Scanner(System.in);
    Dice dice = new Dice(stdIn.nextInt() ,stdIn.nextInt() ,stdIn.nextInt() ,stdIn.nextInt() ,stdIn.nextInt() ,stdIn.nextInt());
    String direction = stdIn.next();
    for (int i = 0; i < direction.length(); i++){
      if (direction.charAt(i) == 'N'){
        dice.TurnN();
      }
      else if (direction.charAt(i) == 'W'){
        dice.TurnW();
      }
      else if (direction.charAt(i) == 'E'){
        dice.TurnE();
      }
      else {
        dice.TurnS();
      }
    }
    System.out.println(dice.Top);
  }
}

class Dice{
  int Top;
  int Bottom;
  int N;
  int S;
  int W;
  int E;
  Dice (int a, int b, int c, int d, int e, int f){
    Top = a;
    S = b;
    E = c;
    W = d;
    N = e;
    Bottom = f;
  }
  public void TurnN(){
    int tmp = Top;
    Top = S;
    S = Bottom;
    Bottom = N;
    N = tmp;
  }
  public void TurnW() {
    int tmp = Top;
    Top = E;
    E = Bottom;
    Bottom = W;
    W = tmp;
  }
  public void TurnE() {
    int tmp = Top;
    Top = W;
    W = Bottom;
    Bottom = E;
    E = tmp;
  }
  public void TurnS() {
    int tmp = Top;
    Top = N;
    N = Bottom;
    Bottom = S;
    S = tmp;
  }
}


class Dice{
  int Top;
  int Bottom;
  int N;
  int S;
  int W;
  int E;
  Dice (int a, int b, int c, int d, int e, int f){
    Top = a;
    S = b;
    E = c;
    W = d;
    N = e;
    Bottom = f;
  }
  public void TurnN(){
    int tmp = Top;
    Top = S;
    S = Bottom;
    Bottom = W;
    N = tmp;
  }
  public void TurnW() {
    int tmp = Top;
    Top = E;
    E = Bottom;
    Bottom = W;
    W = tmp;
  }
  public void TurnE() {
    int tmp = Top;
    Top = W;
    W = Bottom;
    Bottom = E;
    E = tmp;
  }
  public void TurnS() {
    int tmp = Top;
    Top = N;
    N = Bottom;
    Bottom = S;
    S = tmp;
  }
}



Compiler output:
Main.java:72: error: duplicate class: Dice
class Dice{
^
1 error
Language: Java

import java.util.Scanner;
public class Main1{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int [] dice = new int [6];
        for(int x = 0; x < 6; x++){
            dice[x] = scan.nextInt();
        }
        String d = scan.nextLine();
        for (int x = 0; x < d.length();x++){
            dice = roll(d.charAt(x),dice);
        }
        System.out.println(dice[0]);
    }
    public static int[] roll(char s, int dice[]){
        if(s == 'E'){
            int hold = dice[0];
            dice[0] = dice[3];
            dice[3] = dice[5];
            dice[5] = dice[2];
            dice[2] = hold;
        }
        else if(s == 'N'){
            int hold = dice[0];
            dice[0] = dice[1];
            dice[1] = dice[5];
            dice[5] = dice[4];
            dice[4] = hold;
        }
        else if(s == 'S'){
            int hold = dice[0];
            dice[0] = dice[4];
            dice[4] = dice[5];
            dice[5] = dice[1];
            dice[1] = hold;
        }
        else if(s == 'W'){
            int hold = dice[0];
            dice[0] = dice[2];
            dice[2] = dice[5];
            dice[5] = dice[3];
            dice[3] = hold;

        }
        return dice;
    }
}


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

import java.util.Scanner;

public class Main {

	public class Dice {

		int[] dice = new int[6];

		/**
		 * サイコロを用意する
		 * @param nums
		 */
		public Dice(int[] nums) {
			dice = nums;
		}

		/**
		 * サイコロの状態を確認
		 */
		public int[] checkSurface() {
			return dice;
		}


		/**
		 * 入力された方向に移動
		 * @param order
		 */
		public void move(String order) {

			for(Character s : order.toCharArray()) {
				int buf;
		        switch(s){
		            case 'N':{
		                buf = dice[0];
		                dice[0] = dice[1];
		                dice[1] = dice[5];
		                dice[5] = dice[4];
		                dice[4] = buf;
		                break;
		            }
		            case 'E':{
		                buf = dice[0];
		                dice[0] = dice[3];
		                dice[3] = dice[5];
		                dice[5] = dice[2];
		                dice[2] = buf;
		                break;
		            }
		            case 'W':{
		                buf = dice[0];
		                dice[0] = dice[2];
		                dice[2] = dice[5];
		                dice[5] = dice[3];
		                dice[3] = buf;
		                break;
		            }
		            case 'S':{
		                buf = dice[0];
		                dice[0] = dice[4];
		                dice[4] = dice[5];
		                dice[5] = dice[1];
		                dice[1] = buf;
		                break;
		            }
		            case 'R': {
		            	buf = dice[1];
		            	dice[1] = dice[2];
		            	dice[2] = dice[4];
		            	dice[4] = dice[3];
		            	dice[3] = buf;
		            }
		        }
			}
		}

		/**
		 * 指定された状態になるまで回転を行う
		 * @param upper
		 * @param flont
		 * @return dice サイコロの状態
		 */
		public int[] checkRight(int upper, int front) {

			// 上面が指定の面になるまで回転
			for(int i=0; i<3; i++) {
				if(dice[0] == upper) break;
				move("W");
			}
			if(dice[0] != upper) {
				for(int i=0; i<3; i++) {
					if(dice[0] == upper) break;
					move("E");
				}
			}

			// 正面が指定の面になるまで回転
			for(int i=0; i<4; i++) {
				if(dice[1] == front) break;
				move("R");
			}

			return dice;
		}

	}


	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int[] nums = new int[6];
		for(int i=0; i<6; i++) {
			nums[i] = sc.nextInt();
		}

		String order = sc.next();

		sc.close();

		Dice dice = new Dice1().new Dice(nums);
		dice.move(order);

		System.out.println(dice.checkSurface()[0]);
		// 前面を取得し表示
		int[] newNums = dice.checkSurface();
		for(int i=0; i<newNums.length; i++) {
			System.out.print(newNums[i] + " ");
		}
	}

}



Compiler output:
Main.java:122: error: cannot find symbol
		Dice dice = new Dice1().new Dice(nums);
		                ^
  symbol:   class Dice1
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		int[] input_num = new int[6];
		int dice_face_num = 6;
		String roll_str ="";

		Scanner sc= new Scanner( System.in );

		for ( int i = 0 ; i < dice_face_num ; i++ ) {
			input_num[i] = sc.nextInt();
		}

		roll_str = sc.next();

		Dice dice = new Dice(input_num);

		dice.init();

		for( int i = 0 ; i < roll_str.length(); i++ ) {
			dice.roll(roll_str.charAt(i));
//			System.out.println(roll_str.charAt(i) +":"+ dice.get_no());
		}
		System.out.println( dice.get_no() );
		sc.close();
	}

}

public class Dice {
	private int[] num;
	private int[] x_map = new int[4];
	private int[] y_map = new int[4];

	public Dice() {
		this( new int[]{1,2,3,4,5,6} );
	}

	public Dice(int input_num[]) {
		num = new int[6];
		num[0] = input_num[0];
		num[1] = input_num[1];
		num[2] = input_num[2];
		num[3] = input_num[3];
		num[4] = input_num[4];
		num[5] = input_num[5];
	}

	public void init() {
	//横軸
		x_map[0] = num[3];
		x_map[1] = num[0];
		x_map[2] = num[2];
		x_map[3] = num[5];
	//縦軸
		y_map[0] = num[4];
		y_map[1] = num[0];
		y_map[2] = num[1];
		y_map[3] = x_map[3];
	}

	public int get_no() {
		return x_map[1];
	}

	public void roll(char dc) {
		switch( dc ) {
		case 'N' :
			y_map[1] = y_map[2];
			y_map[2] = x_map[3];
			x_map[3] = y_map[0];
			y_map[0] = x_map[1];

			x_map[1] = y_map[1];
			break;
		case 'S' :
			y_map[1] = y_map[0];
			y_map[0] = x_map[3];
			x_map[3] = y_map[2];
			y_map[2] = x_map[1];

			x_map[1] = y_map[1];
			break;
		case 'E' :
			x_map[1] =  x_map[0];
			x_map[0] =  x_map[3];
			x_map[3] =  x_map[2];
			x_map[2] =  y_map[1];

			y_map[1] = x_map[1];
			break;
		case 'W' :
			x_map[1] =  x_map[2];
			x_map[2] =  x_map[3];
			x_map[3] =  x_map[0];
			x_map[0] =  y_map[1];

			y_map[1] = x_map[1];
			break;
		}
	}
}




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

import java.util.*

fun main(args: Array<String>) {
    val scan = Scanner(System."in")
    val DICE: Int = 6
    var dice: Array<Int?> = arrayOfNulls(DICE)
    var dice2: Array<Int?> = arrayOfNulls(DICE)
    var word: String = "A"
    
    for (i in 0 until DICE) {
        dice[i] = scan.nextInt()
    }
    
    var direction = scan.next()
   
    for (i in 0 until direction.length){
        word = direction.substring(i,i)
        when (word) {
            "N" -> dice2[0] = dice[1]
			"N"	-> dice2[1] = dice[5]
			"N"	-> dice2[2] = dice[2]
			"N"	-> dice2[3] = dice[3]
			"N"	-> dice2[4] = dice[0]
			"N"	-> dice2[5] = dice[4]
			"E" -> dice2[0] = dice[3]
			"E"	-> dice2[1] = dice[1]
			"E"	-> dice2[2] = dice[0]
			"E"	-> dice2[3] = dice[5]
			"E"	-> dice2[4] = dice[4]
			"E"	-> dice2[5] = dice[2]
			"S" -> dice2[0] = dice[4]
			"S"	-> dice2[1] = dice[0]
			"S"	-> dice2[2] = dice[2]
			"S"	-> dice2[3] = dice[3]
			"S"	-> dice2[4] = dice[5]
			"S"	-> dice2[5] = dice[1]
	        "W" -> dice2[0] = dice[2]
			"W"	-> dice2[1] = dice[1]
			"W"	-> dice2[2] = dice[5]
			"W"	-> dice2[3] = dice[0]
			"W"	-> dice2[4] = dice[4]
			"W"	-> dice2[5] = dice[3]
        }
        
        dice2 = dice
    }
    scan.close()
    println(dice[0])
}


Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
1 error
Language: Java

import java.util.Scanner

   fun main(args:Array<String>) {
    val scan = Scanner(System.`in`)
    val DICE = 6
    var dice = IntArray(DICE)
    var dice2 = IntArray(DICE)
       
    for (i in 0 until DICE)
    {
      val number: Int = scan.nextInt()  
      dice[i] = number
    }
    val direction = scan.next()
    scan.close()
    for (i in 0 until direction.length)
    {
      when (direction.get(i)) {
        'N' -> {
          dice2[0] = dice[1]
          dice2[1] = dice[5]
          dice2[2] = dice[2]
          dice2[3] = dice[3]
          dice2[4] = dice[0]
          dice2[5] = dice[4]
        }
        'E' -> {
          dice2[0] = dice[3]
          dice2[1] = dice[1]
          dice2[2] = dice[0]
          dice2[3] = dice[5]
          dice2[4] = dice[4]
          dice2[5] = dice[2]
        }
        'S' -> {
          dice2[0] = dice[4]
          dice2[1] = dice[0]
          dice2[2] = dice[2]
          dice2[3] = dice[3]
          dice2[4] = dice[5]
          dice2[5] = dice[1]
        }
        'W' -> {
          dice2[0] = dice[2]
          dice2[1] = dice[1]
          dice2[2] = dice[5]
          dice2[3] = dice[0]
          dice2[4] = dice[4]
          dice2[5] = dice[3]
        }
        else -> {}
      }
      for (j in 0 until DICE)
      {
        dice[j] = dice2[j]
      }
    }
    println(dice[0])
  }






Compiler output:
Main.java:1: error: ';' expected
import java.util.Scanner
                        ^
Main.java:4: error: illegal character: '`'
    val scan = Scanner(System.`in`)
                              ^
Main.java:4: error: illegal character: '`'
    val scan = Scanner(System.`in`)
                                 ^
3 errors