We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 907adfc commit 926f966Copy full SHA for 926f966
Introduction/Java Static Initializer Block/Solution.java
@@ -0,0 +1,11 @@
1
+static Scanner input = new Scanner(System.in);
2
+static int B = input.nextInt();
3
+static int H = input.nextInt();
4
+static Boolean flag = B > 0 && H > 0;
5
+
6
+static{
7
+ if(!flag){
8
+ System.out.println("java.lang.Exception: Breadth and height must be positive");
9
+ }
10
+}
11
0 commit comments