Essay
Define an exception class called DiskDriveNotReady.The class should have a constructor with no parameters.If an exception is thrown with this zero-argument constructor,getMessage should return "Disk Drive Not Ready!" The class should also have a constructor with a single parameter of type String.If an exception is thrown with this constructor,then getMessage returns the value that was used as an argument to the constructor.
Correct Answer:

Verified
public class DiskDriveNotReady...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q23: What is the purpose of the method
Q24: The execution of a throw statement is
Q25: If a method does not catch an
Q26: List five common examples of exceptions that
Q27: Write a complete Java program that prompts
Q29: Define an exception class called FileNotFoundException.The class
Q30: Methods that process String arguments as if
Q31: If a method throws an exception,and the
Q32: When using the Scanner class one should
Q33: All exceptions are descendants of the class:<br>A)Throwable<br>B)Catchable<br>C)Tryable<br>D)Blockable