Dont answer this question just 17-21State whether the following exceptions are c
ID: 3716567 • Letter: D
Question
Dont answer this question just 17-21State whether the following exceptions are checked or unchecked exceptions. (Hint: You will need to know the inheritance hierarchy of each of these exception classes: its superclass, its superclass’s superclass, etc. This can be found near the top of the Javadoc documentation for each
class. Google should return the Javadoc of the class as the first result when you search for java 9 javadoc className, replacing className with the exception’s name.)
java.lang.ArithmeticException java.lang.ClassNotFoundException java.io.IOException java.lang.NumberFormatException java.sql.SQLException
17.Which class contains the format method for writing to a text file?
18.Which class can be used to retrieve Strings, numeric primitives, or full lines of text from a text file?
19.Which interface must a class implement in order for its objects to be serialized?
20.Which class contains the writeObject method for serializing an object?
21.Which class contains the readObject method for deserializing an object?
Explanation / Answer
17.Which class contains the format method for writing to a text file?
Ans: PrintStream class
18.Which class can be used to retrieve Strings, numeric primitives, or full lines of text from a text file?
Ans: Scanner class
19.Which interface must a class implement in order for its objects to be serialized?
Ans: Serializable interface
20.Which class contains the writeObject method for serializing an object?
Ans: ObjectOutputStream class
21.Which class contains the readObject method for deserializing an object?
Ans: ObjectInputStream class
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.