This document contains questions and answers about packages, interfaces, classes, exceptions, threads, and strings in Java. Some key points addressed are:
- Packages are used to organize related classes and avoid name conflicts. Interfaces define methods but not implementations, and are used for abstraction and multiple inheritance.
- There are three thread states: ready, running, and waiting. wait() releases the lock to allow other threads to run while sleep() does not.
- Exceptions can be checked, which must be declared or caught, or unchecked, which extend RuntimeException. Custom exceptions are created by extending the Exception class.
- Strings are immutable in Java but StringBuffer and StringBuilder provide mutable string alternatives.