This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
java:exceptions_try_with_resources [2021/03/22 21:39] gthanos |
java:exceptions_try_with_resources [2021/03/22 21:44] gthanos |
||
|---|---|---|---|
| Line 35: | Line 35: | ||
| </ | </ | ||
| - | <code java Rectangle.java> | + | <code java SafelyCreateRectangle.java> |
| - | public class SafeCreateRectangle | + | import java.util.Scanner; |
| + | |||
| + | public class SafelyCreateRectangle | ||
| public static void main(String []args) { | public static void main(String []args) { | ||
| Scanner sc = new Scanner(System.in); | Scanner sc = new Scanner(System.in); | ||
| Line 59: | Line 61: | ||
| </ | </ | ||
| - | |Προηγούμενο: | + | |Προηγούμενο: |