Содержание
- 2. VI. Исключения 3. Стандартные исключения
- 3. Неконтролируемые исключения
- 4. Неверное использование ссылки null
- 5. Неверное использование ссылки null public class NullPointerExceptionDemo { public static void main(String[] args) { String[] staff
- 6. Неверное приведение public class ClassCastExceptionDemo { public static void main(String[] args) { Object obj = new
- 7. Операция не поддерживается public class OperationNotSupportedExceptionDemo { public static void main(String[] args) { Set greetings =
- 8. Некорректное состояние public class IllegalStateExceptionDemo { public static void main(String[] args) { Set staff = new
- 9. Выход за пределы массива public class IndexOutOfBoundsExceptionDemo { public static void main(String[] args) { int[] anArray
- 10. Неверный аргумент public class IllegalArgumentExceptionDemo { public static void main(String[] args) { SimpleDateFormat sdf = new
- 11. Ошибка преобразования в число public class NumberFormatExceptionDemo { public static void main(String[] args) { String[] numbers
- 12. Проверяемые исключения
- 13. Контролируемые исключения
- 14. Определение класса не найдено во время выполнения java.lang.ClassNotFoundException: DoesNotExist at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
- 15. public class FileNotFoundExceptionDemo { public static void main(String[] args) { BufferedReader br = null; try {
- 16. Файл не найден java.io.FileNotFoundException: I:\DoesNotExist.txt (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at
- 17. public class SQLExceptionDemo { static final String DB_URL = "jdbc:derby:C:/otherDirectory/myDB"; static final String USER = "sa";
- 18. Ошибка доступа к СУБД Connecting to a selected database... java.sql.SQLException: Database 'c:/otherDirectory/myDB' not found. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
- 19. Неправильно сформированный URL java.net.MalformedURLException: unknown protocol: gttp at java.net.URL. (URL.java:574) at java.net.URL. (URL.java:464) at java.net.URL. (URL.java:413)
- 20. Ошибки (Errors)
- 21. Ошибки (Errors)
- 22. Определение класса не найдено public class NoClassDefFoundErrorDemo { public static void main(String[] args) { Student harry
- 23. Определение класса не найдено F:\spaces\javase-space\06.Exceptions\bin>dir standard Volume in drive F has no label. Volume Serial Number
- 24. Определение класса не найдено F:\spaces\javase-space\06.Exceptions\bin>del standard\Student.class F:\spaces\javase-space\06.Exceptions\bin>dir standard Volume in drive F has no label. Volume
- 25. Переполнение стека public class StackOverflowErrorDemo { public static void RecursiveSayHello() { System.out.println("Hello World!"); RecursiveSayHello(); } public
- 26. Недостаточный объём памяти public class OutOfMemoryErrorDemo { public static void main(String[] args) { int[][] bigArray =
- 28. Скачать презентацию