3]. Competitive Programming/03]. HackerRank/1]. Practice/04]. Java/1]. Introduction/_10)_Java_Static_Initializer_Block.java
<reponame>Rau379/The-Complete-FAANG-Preparation/**
 * 
 */
 
import java.util.Scanner;

/**
 * @author Mayur Ingle(https://github.com/thecoder8890)
 * https://www.hackerrank.com/challenges/java-static-initializer-block/problem
 *
 */
public class JavaStaticInitializerBlock {
	static Scanner sc = new Scanner(System.in);
	static int B = sc.nextInt();
	static int H = sc.nextInt();
	static boolean flag;
	static {
		try {
			if (B > 0 && H > 0) {
				flag = true;
			} else {
				throw new Exception("Breadth and height must be positive");
			}
		} catch (Exception e) {
			System.out.println(e);
		}
	}
}
