a) Write a java statement to import the java utilities.
b) Create a Scanner object to read input.
c) int Age; Write a java statement to read the Age input value.
Write a java statement to read the Age input value.
// TestCode.java // java statement to import the java utilities. import java.util.Scanner; public class TestCode { public static void main(String[] args) { // Create a Scanner object to read input. Scanner scan = new Scanner(System.in); int age; System.out.print("Enter age: "); // java statement to read the Age input value age = scan.nextInt(); System.out.println("Age is "+age); } }
Get Answers For Free
Most questions answered within 1 hours.