User Tools

Site Tools


java:exceptions_try_with_resources

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
java:exceptions_try_with_resources [2021/03/22 21:39]
gthanos
java:exceptions_try_with_resources [2021/03/22 21:42]
gthanos
Line 35: Line 35:
 </code> </code>
  
-<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);
java/exceptions_try_with_resources.txt · Last modified: 2021/03/22 21:44 (external edit)