What is the difference between “throw” and “throws” in Java?
A. “throw” is used to throw an exception, while “throws” is used to declare an exception.
B. “throws” is used to throw an exception, while “throw” is used to declare an exception.
C. “throw” is used to catch an exception, while “throws” is used to declare an exception.
D. “throws” is used to catch an exception, while “throw” is used to declare an exception.
Answer:A
What is the difference between “throw” and “throws” in Java?
A. “throw” is used to throw an exception, while “throws” is used to declare an exception. B. “throws” is used to throw an exception, while “throw” is used to declare an exception. C. “throw” is used to catch an exception, while “throws” is used to declare an exception. D. “throws” is used to catch an exception, while “throw” is used to declare an exception.