//ScanDriver.java import java.io.Console; public class ScanDriver { public static int floor = 1; public static void main(String[] args) { /* String str = Scan.getString("InputString: "); System.out.println("echo : " + str); double dou = Scan.getDouble("InputDouble: "); System.out.println("echo : " + dou); char ch = Scan.getChar("InputChar: "); System.out.println("echo : " + ch); */ boolean bool = Scan.getBoolean("Do you go up the stairs? (y/n): "); System.out.println("echo : " + bool); if(bool){ floor++; System.out.println("Went up to the " + floor + " floor"); }else{ System.out.println("On the " + floor + " floor"); } } }