connnnor3108 connnnor3108
  • 24-01-2020
  • Computers and Technology
contestada

Write a statement that outputs variable userNum. End with a newline.

Respuesta :

ijeggs
ijeggs ijeggs
  • 25-01-2020

Answer:

System.out.println(userNum);

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);

   }

}

Answer Link

Otras preguntas

In Microsoft Word you can access the blank command from the mini toolbar
Water power, geothermal and solar power are all examples of a. non-renewable resources used worldwide. c. non-renewable resources that are no longer available.
what are two major vegetation zones in ancient egypt and the middle east
What is a type of law that represents all of the laws that apply to a citizen?
What is one way to appeal to ethos
write one two sentences explaining the relationship between rate ,ratio and percent
Lines 437-446: what theme is conveyed by odyssey’s behavior in this part of the poem?
In 1954, in the holmes case, the u.s. supreme court ruled that __________.
A phobia is an exaggerated, unrealistic fear of a specific situation, object, or activity. a. True b. False
How did spain attempt to stop the lewis and clark expedition?