PBO - Week 04 - Array Progs
PBO - Week 04 - Array Progs
System.exit( 0 );
}
}
// initialize applet
public void init()
{
JTextArea outputArea = new JTextArea();
Container container = getContentPane();
container.add( outputArea );
int array[] = { 1, 2, 3, 4, 5 };
String output =
"Effects of passing entire array by reference:\n" +
"The values of the original array are:\n";
// multiply argument by 2
public void modifyElement( int element )
{
element *= 2;
}
int array1[][] = { { 1, 2, 3 }, { 4, 5, 6 } };
int array2[][] = { { 1, 2 }, { 3 }, { 4, 5, 6 } };
outputArea.append( "\n" );
}
}
}