Skip to content

Commit b3d2617

Browse files
authored
Add files via upload
1 parent 00efdc8 commit b3d2617

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Java Static Initializer Block.java

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
}

0 commit comments

Comments
 (0)