Given:
1. public class Main { 2. public static void main(String[] args) { 3. // insert code here 4. } /*from w ww. j ava2 s. c o m*/ 5. } 6. class MyClass { 7. enum Members { 8. Dev(48), Tester(74), Manager(50); 9. int height; 10. Members(int h) { height = h; } 11. int getHeight() { return height; } 12. } 13. }
And these four lines of code to be inserted, independently at line 3:
getHeight()
; getHeight()
; getHeight()
; Which are true? (Choose all that apply.)
A
A is the correct syntax to access the height variable.
B, C, and D are incorrect syntax, and E is incorrect because enums can have variables, constructors, and methods.