05 exceptions 01 Slide Java

31 265 0
05 exceptions 01 Slide Java

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

SLIDE JAVA 05 LIDE JAVA 05 16/1Exceptions Exceptions Reading: Savitch, Chapter 816/2ObjectivesObjectivesTo learn what an exception is.To learn how to handle an exception.16/3What is an Exception?What is an Exception?An exception is an object that describes an unexpected situation.Definition: An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions. 16/4Exampleint a = 4, b = 4;int [ ] intAy = new int[4];intAy[0] = a/(a - b); //this will generate and throw an ArithmeticException //objectfor(int k = 1; k

Ngày đăng: 22/02/2014, 22:15

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan