Java Chapter 7 ES 20

preview_player
Показать описание
==================================================
30/11/2024
========
Exception Handling

when ever we developed one app there is chance of getting some exception or error in the app
when exception occured in the program program may terminate abnormal is called exception
exception handling is a mechanism to catch and throw java exception

try catche throw throws finally

why occurs exception
===============
invalid user input
device failure
loss of network connection
out memory code errors
resource exhaustion

try(){
int a=10;
int b= 0;
int c = a/b;
}catche(arithmeticException e){
}
====================
finally
=====
try = catch == finally
=========================================

program
=======

public class Test {
public static void main(String[] args) {
try {
}
}catch (IOException | SQLException e){
}
}
}
Рекомендации по теме
join shbcf.ru