Given:
2. public class Main { 3. Main v; /*from w w w . ja v a 2 s . c o m*/ 4. int size; 5. public static void main(String[] args) { 6. Main myV = new Main(); 7. final Main v2; 8. v2 = myV.doStuff(myV); 9. v2.v.size = 7; 10. System.out.print(v2.size); 11. } 12. Main doStuff(Main v3) { 13. v3.size = 5; 14. v3.v = new Main(); 15. return v3; 16. } }
What is the result? (Choose all that apply.)
A is correct.
A reference variable marked "final" cannot reference a different object, but the object it references can be changed.