Identifier expected error... in Array List
I'm trying to make a programm but I have some problems.Here is the source code
 

    import java.util.Random;
        import java.util.*;
        public class LotteryMachine
        {
         public int lotterynumber1 ;
         public int lotterynumber2;
         public int lotterynumber3;
         private static Random random=new Random();
          
         public void MakeADraw(){
         lotterynumber1=random.nextInt(max)+1;
         lotterynumber2=random.nextInt(max)+1;
         lotterynumber3=random.nextInt(max)+1;
        
        }
        
         ArrayList<String> aListNumbers = new ArrayList<String>();
         int x=lotterynumber1; //This is the line with the error 
         int y=lotterynumber2;
         int z=lotterynumber3;
         aListNumbers.add("x");
         aListNumbers.add("y)";
         aListNumbers.add("z");
         
        }

Can anyone tell me what I'm doing wrong? Thanks very much

Identifier expected error... in Array List
===

I'm trying to make a programm but I have some problems.Here is the source code
 

    import java.util.Random;
        import java.util.*;
        public class LotteryMachine
        {
         public int lotterynumber1 ;
         public int lotterynumber2;
         public int lotterynumber3;
         private static Random random=new Random();
          
         public void MakeADraw(){
         lotterynumber1=random.nextInt(max)+1;
         lotterynumber2=random.nextInt(max)+1;
         lotterynumber3=random.nextInt(max)+1;
        
        }
        
         ArrayList<String> aListNumbers = new ArrayList<String>();
         int x=lotterynumber1; //This is the line with the error 
         int y=lotterynumber2;
         int z=lotterynumber3;
         aListNumbers.add("x");
         aListNumbers.add("y)";
         aListNumbers.add("z");
         
        }

Can anyone tell me what I'm doing wrong? Thanks very much
