Can't compile my code, need help!
Hello! I am a beginner and not very good at java. I am having trouble compiling my code. Does anyone have some time to look over it to see what I've done wrong?? The compiling error that I keep receving is saying it cannot find the symbol for the "if ( counter..." part of the program. symbol: variable counter. Location: class RandomIntegers2. Any help is greatly appreciated!!! thanks!!
Here is the question: Write a program that rolls a four sided die 4 times and stores results in int a .
Here is my code:
public class RandomIntegers2
public static void main( String args )
Random randomNumbers = new Random();
face = 1 + randomNumbers.nextInt( 4 );
System.out.printf( "%d ", face );
if ( counter % 5 == 0 )