See More

import java.util.Scanner; public class JavaStaticBlock { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int b=sc.nextInt(); int h=sc.nextInt(); int area=1; if(b>0 && h>0){ area=b*h; System.out.println(area); }else{ System.out.println("java.lang.Exception: Breadth and height must be positive"); } } }