tp10
This commit is contained in:
6
DEV2.1/Exception/ex1/NullPointerException.java
Normal file
6
DEV2.1/Exception/ex1/NullPointerException.java
Normal file
@@ -0,0 +1,6 @@
|
||||
public class NullPointerException {
|
||||
public static void main(String[] args) {
|
||||
String str = null;
|
||||
int length = str.length(); // Tentative d'accéder à une méthode sur un objet nul
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user