The difference between throw and throws

throw: throw the exception object manually (when the exception occurs, the system automatically generates an exception object)


throws: hand over the exception handling to the function caller

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327003255&siteId=291194637