... n comma x right parenthesis semicolon. Line 45, indented once. right brace forward slash forward slash end method use Field. Line 46. right brace forward slash forward slash end class Scope. The output has 10 lines. The lines reads. Line 1. local x in main is 5. Line 2. local x on entering method use Local Variable is 25. Line 3. local x before exiting method use Local Variable is 26. Line 4. field x on entering method use Field is 1. Line 5. field x before exiting method use Field is 10. Line 6. local x on entering method use Local Variable is 25. Line 7. local x before exiting method use Local Variable is 26. Line 8. field x on entering method use Field is 10. Line 9. field x before exiting method use Field is 100. Line 10. local x in main
Get Android How to Program, 3/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.