title: How can I check if the user entered in an array is palindrome or not?
body: <p>I need help guys I have been checking on google for similar question but I cant find the most suitable answer for this. Here is my output. </p>
  
  <pre><code>Enter 3 Elements  
  23
  Is a palindrome  
  22
  Is not a palindrome  
  11
  Is not a palindrome  
  </code></pre>
  
  <p>The program:</p>
  
  <pre><code>public static void main(String [] args)
  {
    int number = 0;
    int reverse =0;
    int numCopy = 0; 
    Scanner scan = new Scanner(System.in);
    System.out.println("Enter how many numbers you want to enter");
    int num = scan.nextInt();
    System.out.println("Enter "+num +" Elements");
    numCopy = num;          
    int[] array = new int[num];             
    for(int i = 0; i &lt; num; i++)
    { 
      array[i] = scan.nextInt();
      int digit = numCopy % 10;
      numCopy = numCopy / 10;
      reverse = (reverse * 10) +digit;
      if(num == reverse)          
      {
        System.out.println("Is a palindrome");    
      }
      else
      {
          System.out.println("Is not a palindrome");
      }
    }
  }
  </code></pre>