Add Interest - Java Quiz Question


What will be the output of the following program?


A
Principal before adding interest : 5000.0
Principal after adding interest : 5625.0
B
Principal before adding interest : 5000.0
Principal after adding interest : 5000.0
C
Principal before adding interest : 5000.0
Principal after adding interest : 625.0
D
Compilation Error - since the compound assignment operator (+=) can not be applied on member variables