...
Code Block | ||
---|---|---|
| ||
interface MutableInterface {
int[] getArray(); // accessor
void setArray(int[] i); //mutator
}
class SensitiveMutable implements MutableInterface {
int[] array = new int[10]; // mutable array
public int[] getArray() {
return array.clone();
}
public void setArray(int[] i) {
array = i;
}
}
|
...