Output of this program : class type { int num=12; void setnum(int num){ num=num; } int getnum() { return num; } public static void main(String[] args){ type obj=new type(); obj.setnum(10); System.out.print(obj.getnum()); } }
10
12
compilation error
none of these