Getting "Type mismatch: cannot convert from int to Object" error at the time of initiation of integer inside Object Array in java
<pre><code>public class objArrayPractice {
    public static void main(String[] args) {
        Object ar []= new Object [4];
        ar[0]= 12;
    }
}
</code></pre>

<p>when I write ar[0]= 12; I am getting the error: "Type mismatch: cannot convert from int to Object"</p>