Bubble Sort in JAVA
<p>I am trying to write a Bubble sort program. It shows error.but I don't understand why?I am new  in java</p>

<pre><code>public static  void main(String[] args) {
    int []arr={12,23,43,34,3,6,7,1,9,6};
        {  
              int temp;
              for (int i=0;i&lt;arr.length;i++)
              {  
                for (int j=0;j&lt;arr.length-i;j++ )
                {
                  if (arr[j]&gt;arr[j+1])
                 {  
                     temp=arr[j];
                     arr[j+1]=arr[j];
                     arr[j+1]=temp;
                  }
                }
              } 
            }
        for(int i=0; i&lt;arr.length; i++)
         {
             System.out.print(arr[i] + " ");
         }
    }
</code></pre>
