- What are the legal operands of the instanceof operator?
Answer: The left operand is an object reference or null value and the right operand is a class, interface, or array type.
- What an I/O filter?
Answer: An I/O filter is an object that reads from one stream and writes to another, usually altering the data in some way as it is passed from one stream to another.
- If an object is garbage collected, can it become reachable again?
Answer: Once an object is garbage collected, it ceases to exist. It can no longer become reachable again.
- What are E and PI?
Answer: E is the base of the natural logarithm and PI is mathematical value pi.
- Are true and false keywords?
Answer: The values true and false are not keywords.
- What is the difference between the File and RandomAccessFile classes?
Answer: The File class encapsulates the files and directories of the local file system. The RandomAccessFile class provides the methods needed to directly access data contained in any part of a file.
- What happens when you add a double value to a String?
Answer: The result is a String object.
- What is your platform's default character encoding?
Answer: If you are running Java on English Windows platforms, it is probably Cp1252. If you are running Java on English Solaris platforms, it is most likely 8859_1.
- Which package is always imported by default?
Answer: The java.lang package is always imported by default.
- What interface must an object implement before it can be written to a stream as an object?
Answer: An object must implement the Serializable or Externalizable interface before it can be written to a stream as an object.