Answer:
System.out.println(userNum);
Step-by-step explanation:
Using Java programming language, lets assume the variable userNum is entered by a user. The code snippet below will prompt the user to enter a number and output the the variable:
import java.util.Scanner;
public class TestClass {
public static void main(String[] args) {
System.out.println("Enter a number");
Scanner input = new Scanner(System.in);
int userNum = input.nextInt();
System.out.println(userNum);
}
}