package class3_3_Lab2Hint_LineScanner_start; import java.util.Scanner; public class UsingScanner { public static void main(String[] args) { /// Scanner Hint for Lab 2 System.out.println("Enter a number:"); Scanner in = new Scanner(System.in); // We only use in.nextLine with the scanner wrapped around System.in: Scanner lineScanner = new Scanner(in.nextLine()); int num = lineScanner.nextInt(); System.out.println("num = " + num); } }