- What is the difference between the File and RandomAccessFile classes?
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?The result is a String object.
- What is your platform's default character encoding?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?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?An object must implement the Serializable or Externalizable interface before it can be written to a stream as an object.
- How are this and super used?
this is used to refer to the current object instance.
super is used to refer to the variables and methods of the superclass of the current object instance.