Modify the given method. It should throw an IOException.
Throwing exceptions
Throw an IOException
Report a typo
Write a program in Java 17
import java.io.IOException;
public class Main {
// change this method
public static void method() {
}
/* Do not change code below */
public static void main(String[] args) {
try {
method();
} catch (Exception e) {
System.out.println(e.getClass());
}
}
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.