Question: Java Questions Q1) How do I print a stack trace for exceptions? a) By calling Throwable's printStackTrace() method b) By keeping a list of method
Java Questions
Q1) How do I print a stack trace for exceptions?
a) By calling Throwable's printStackTrace() method
b) By keeping a list of method calls and then print that list when exception occurs
c)By calling Throwable's getMessage() method
d) By writing my own toPrint() method
Q2) Byte Streams handle I/O of raw binary data.
a) True
b)False
Q3)You can return an array from a method.
a) True
b)False
Q4) Any checked exception that may be thrown in a method must be either caught by that method or declared in the method's throws clause.
a) True
b)False
Q5) What are the classes implementing List interface?
HashSet, ArrayList
MapSet, HashMap
ArrayList, LinkedList
No concrete class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
