Introduction to Exception
Exception is an unexpected error that occurs at runtime (when an application is running). Sometimes a programmer doesn’t know what and which exception could occur at runtime. For example, the code is reading a file but the file is missing from the location where it is read. It is accessing or reading data across the network but the Internet is not available, or it is loading some kind of data in memory but the system runs out of memory, etc. In all these cases, programmers write the code right but, due ...