when i run my program from the main i get the error on this line: private class Node
I have a (circular) linked list class with a bunch of methods (only the first one shown here) and then a separate main. I'd like to know what is causing this issue. Any help would be greatly appreciated. thanks.
    public class CircleGame 
    {
        //Node class (inner class)
        private class Node
        {
            private int data;
            private Node next;
            //constructor of Node
            private Node(int data, Node next)
            {
                this.data = data;
                this.next = next;
            }
        }
        /****************************************************/
        private Node head;
        int size =0;
        int k = 0;
        int s = 0;
        //constructor of list
        public CircleGame()
        {
            head = null;
        }
        /****************************************************/
        public void addToEnd(int data)
        {
            //insert at beginning
            if (head == null)
                head = new Node(data, null);
            //insert at other positions
            else 
            { Node temp = head;
                int i=0;
                while(i <size)
                { 
                    temp = temp.next;
                    temp.next = new Node(data, head); 
                    i++;
                }
            }
            size ++;
        }
        /**************************************************/
    //main 
   import java.util.*;
public class CircleGameMain
{
    public static void main (String [] args)
    {
        Scanner keyboard = new Scanner(System.in);
        CircleGame game = new CircleGame();
        System.out.println("***********WELCOME TO The CIRCLE GAME************");
        System.out.print("How many players are in the circle? ");
        int size = keyboard.nextInt();
        System.out.println();
        int data;
        for(int i = 0; i < size; i++) 
        {
            data = i+1;
            game.addToEnd(data);
        }
        game.print();
        System.out.print("What position would you like to start at? ");
        int s = keyboard.nextInt();
        System.out.println();
        System.out.print("Eliminate the kth player. k= ? ");
        int k =keyboard.nextInt();
        System.out.println();
        game.game(s,k);
    }
}
 
    