The Loan class given in the text does not implement java.io.Serializable. Analyze the following code.

```
public class Foo implements java.io.Serializable {
private int v1;
private static double v2;
private Loan v3 = new Loan();
}```
a. An instance of Foo can be serialized because Foo implements Serializable.
b. An instance of Foo cannot be serialized because Foo contains a non-serializable instance variable v3.
c. If you mark v3 as transient, an instance of Foo is serializable.


bc An object may not be serialized even though its class implements java.io.Serializable, because it may contain non-serializable instance variables.

Computer Science & Information Technology

You might also like to view...

When working with a report, add ____.

A. no more than three fields B. no more than five fields C. no more than seven fields D. as many fields as you would like

Computer Science & Information Technology

Deleted records or fields:

A) can be undone by the "re-add" box B) can be undone by the "undo" box. C) can be undone by the "reverse warning" box D) cannot be undone.

Computer Science & Information Technology

Which of the following is true about using a text file for input?

A. The data set can be much larger. B. Data can be input faster and with less chance of error. C. Data can be used repeatedly with the same program or with different programs. D. All of the above are true.

Computer Science & Information Technology

?In _____, systems analysts use a prototype to verify user requirements, after which the prototype is discarded and implementation continues.

A. ?system prototyping B. ?command prototyping C. ?design prototyping D. ?layout prototyping

Computer Science & Information Technology