Ask Question
23 March, 15:58

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.

+1
Answers (1)
  1. 23 March, 16:18
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers