tp10
This commit is contained in:
6
DEV2.1/Exception/ex1/NumberFormatException.java
Normal file
6
DEV2.1/Exception/ex1/NumberFormatException.java
Normal file
@@ -0,0 +1,6 @@
|
||||
public class NumberFormatException {
|
||||
public static void main(String[] args) {
|
||||
String str = "abc";
|
||||
int num = Integer.parseInt(str); // Conversion d'une chaîne non numérique en entier
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user