what is the main function for this variable in the code
int n= 1;
import javax.swing.*;
public class Qustion3C{
public static void main (String args[]){
int[] a={1,4,9,6,1,9,7,8,2};
int x;
int n= 1; <<<<<<<<<<<<<<<<<<<<< wondering about this
String c;
c= JOptionPane.showInputDialog(null, "please Enter x value");
x= Integer.parseInt(c);
for (int i=0; i<a.length; i++){
if (a[i]==x){
JOptionPane.showMessageDialog(null,"we found x in index="+i);
n= 2;
break; }
}
if(n==1){
JOptionPane.showMessageDialog(null, "-1");
}
}
}