You are viewing a single comment's thread. Return to all comments →
static Scanner in=new Scanner(System.in);
static int B=in.nextInt();
static int H=in.nextInt();
static boolean flag=true;
why did we add static? couldn't get.I am new for Java.
becz since it is a static block all fields(variables) should be static
it is similar to using static variables in static methods
Can you paste a link?