title: prog.java:52: error: incompatible types: int cannot be converted to boolean for(int i=0;i=n/2;i++){
body: <p>Does values in for loop gives boolean results in Java?
  Getting this error when I compiled the code:</p>
  <blockquote>
  <p>prog.java:52: error: incompatible types: int cannot be converted to boolean
  for(int i=0;i=n/2;i++){</p>
  </blockquote>
  <pre><code>public static void reverseArray(int arr[], int n) {
      // Your code here
      
          int temp;
          int i=0;
          for(i=0;i=n/2;i++){
              temp = arr[i];
              arr[i]=arr[n-i];
              arr[n-i]=temp;
          }
  
      }
  </code></pre>