import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class Week8Task2 { public void nullPointerEx() { throw new NullPointerException(); } public void arrayIndexOutOfBoundsEx() { throw new ArrayIndexOutOfBoundsException(); } public void arithmeticEx() { throw new ArithmeticException(); } public void fileNotFoundEx() throws FileNotFoundException { throw new FileNotFoundException(); } public void ioEx() throws IOException { throw new IOException(); } public String nullPointerExTest() { return "Lỗi Null Pointer"; } public String arrayIndexOutOfBoundsExTest() { return "Lỗi Array Index Out of Bounds"; } public String arithmeticExTest() { return "Lỗi Arithmetic"; } public String fileNotFoundExTest() { return "Lỗi File Not Found"; } public String ioExTest() { return "Lỗi IO"; } }