Shreyas arya

Generation

generate functionFri, 10 Feb 2023

Create a method to throw an exception

public void throwException() throws Exception { throw new Exception("An exception thrown"); }

Questions about programming?Chat with your personal AI assistant