

MCQOPTIONS
Saved Bookmarks
1. |
What is the output of this program? 1. class box 2. { 3. int width; 4. int height; 5. int length; 6. int volume; 7. void finalize() 8. { 9. volume = width*height*length; 10. System.out.println(volume); 11. } 12. protected void volume() 13. { 14. volume = width*height*length; 15. System.out.println(volume); 16. } 17. } 18. class Output 19. { 20. public static void main(String args[]) 21. { 22. box obj = new box(); 23. obj.width=5; 24. obj.height=5; 25. obj.length=6; 26. obj.volume(); 27. } 28. } |
A. | 150 |
B. | 200 |
C. | Run time error |
D. | Compilation error |
Answer» B. 200 | |