Any type of data at all:
short,
int, double, ...We have not used arrays of object references so far in these notes. They will be discussed in a future chapter.
| Here is a short program: | Here is a description of the action: |
|---|---|
// Review Program
//
class Alteration
{
void zero ( int x )
{
x = 0;
}
}
class AlterTest
{
public static void main ( String[] args )
{
Alteration alt = new Alteration();
int value = 27;
System.out.println( "Before:" + value );
alt.zero( value );
System.out.println( "After:" + value );
}
}
|
|