Ask Question
26 October, 19:25

Given an int variable datum that has already been declared, write a few statements that read an integer value from standard input into this variable.

+5
Answers (1)
  1. 26 October, 21:44
    0
    Following are the Statement in the Java Language.

    Scanner out = new Scanner (System. in); / / creating the object

    datum = out. nextInt (); / / Read the integer value bu using the instance of scanner class

    Explanation:

    In the Java Programming Language The scanner class is used for taking the user input from the standard input The definition of scanner class is java. util package means that if you taking the input by using scanner class firstly importing the predefined package i. e Java. util.

    The description of the above code is given below

    Scanner out = new Scanner (System. in); : This statement created the instance "out" of the scanner class which is used for taking the input. datum = out. nextInt (); : This statement taking the integer input and store them into the datnum variable.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Given an int variable datum that has already been declared, write a few statements that read an integer value from standard input into this ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers