Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Manisekar
public int[] resizeArr(int [] b,int n)
{
z = n;
b = new int[10];
b = (int[])ArrayUtils.expand(b);
return b;
}
SCJP 5.0
Manisekar
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
1 + 1 = 10 is always one of the plausible truths for me.
Mark Nathon wrote:You can call a method by value or by reference.
So, any modification to the array elements in another function would mean that the original array would also be modified similarly.
I see Stephan has already explained your mistake. Thank you for giving us that link It is unfortunate that people still write that sort of rubbish in tutorials.Mark Nathon wrote:. . . You can call a method by value or by reference. . . . Java always passes arrays and vectors by reference. . . .
Alas, poor Yorick, he knew this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|