10. How are static methods different from non-static methods? How do you invoke a static
method? Give an example of a static method.
11. Explain the difference between an object reference in Java and an object. Use an example
to illustrate your answer.
12. Explain how objects are created in Java and how the memory used by objects is recovered.
13. How do you get the first character of a string in Java? How do you access the last character
of a string? Use Java code to illustrate your answer.
14. How would you write an expression in Java to generate a random integer value between
100 and 200, where the numbers 100 and 200 were both included in the set of possible
numbers that could be generated?
16. What is the difference between throwing an exception and catching an exception?
17. Explain the difference between a checked exception and an unchecked exception.
18. What happens if an exception does not have a matching catch block?
19. What can your program do with the exception object that a catch block receives?
20. What is the purpose of the finally block?