Which three are legal ways to declare and initialize an instance variable?

Which three are legal ways to declare and initialize an instance variable? (Choose three.)

Which three are legal ways to declare and initialize an instance variable? (Choose three.)

A.
public Integer f = new Integer(42);

B.
static Integer f = new Integer(42);

C.
public Integer f = null;

D.
static int x = 42;

E.
public int x = ‘c’;

F.
public int x = null;



Leave a Reply 0

Your email address will not be published. Required fields are marked *