Hi it's me Again,
class objref
{
void print(Integer I)=============>Wrapper Class object for Integer class.
{
i++;
}
void print(int a[])
{
for(int ij=0;j<a.length;j++)
a[j]++;
}
public static void main(
String[] args)
{
Integer i=new Integer(5);=====>object for Integer class;
new objref().print(i);
}
}
* Normally the value of arrayobject which we are passing to the method
is incremented and it is the type of callbyreference.
* But here i had created the object for WrapperClass Integer, but it wont be
like CallByReference model.
* My question is how the CallByReference is working for ArrayClasses and
Whynot to WapperClassess?
* Please Explain anyone with the suitable examples or Explanations.
Thanks & Regards,
Vijay