import java.util.Scanner; public class Scope /** This class demonstrates block scope * */ { public static void main(String[] args) { int x=1; System.out.println("x="+x); if (x==1) { //int x=9; // no good cannot have 2 variables with same name in this method int y=9; } int y=10; // begin with this on Wed, and use it to continue with conditional // then formatted output, and then while loop int num1=10, num2=20; if (num1 > num2) { int max = num1; } else { int max = num2; } System.out.println("max is " + max); } } // write a program to read in an integer. // print whether the number is positive, negative or zero // If the number is positive, print whether it is divisible by 3.