How to resize an array using a boolean resize() method
843785Jan 25 2009 — edited Jan 25 2009Hello,
Could anyone provide pointers as to how I would accomplish resizing an array using a boolean resize() method.
I believe the correct format for this would be. I am just unclear of how exactly what values and variables would need to be created.
public boolean resize(int newSize);
//returns true if successful (widening), false if narrowing
for ()
if()
break;
return false;
else
{
for()
return true;
}