1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
In-s [12.5K]
1 year ago
12

Suppose a scanner object is created as follows: scanner input = new scanner(system.in); what method do you use to read a real nu

mber?
Computers and Technology
1 answer:
Allushta [10]1 year ago
6 0

Suppose a scanner object is created as follows: scanner input = new scanner(system.in); the method you use to read a real number is Scanner input = new Scanner(System.in); input. nextDouble();

This is because the Scanner input = new Scanner(System.in); input. nextDouble(); command creates the input for a number that contains both whole numbers and decimal numbers and this is why double is used and not int.

<h3>What is a Double in Programming?</h3>

This refers to the fundamental data type that is encoded into the compiler and used to define numeric variables holding numbers with decimal points

Hence, we can see that Suppose a scanner object is created as follows: scanner input = new scanner(system.in); the method you use to read a real number is Scanner input = new Scanner(System.in); input. nextDouble();

This is because the Scanner input = new Scanner(System.in); input. nextDouble(); command creates the input for a number that contains both whole numbers and decimal numbers and this is why double is used and not int.

Read more about double and float here:

brainly.com/question/13260053

#SPJ1

You might be interested in
Timothy is a multimedia designer. He needs to create a prototype of a new product that his firm is launching. Which multimedia s
mestny [16]

Explanation:

The answer is D. 3-f modeling

5 0
3 years ago
Write a program to input elements of 4*3matrix and prints its elements properly using array ​
Harlamova29_29 [7]

Answer:

Step by step explanation:

7 0
2 years ago
What is HDLC flow control?​
Likurg_2 [28]
HDLC is a synchronous Data Link layer bit-oriented protocol developed by the International Organization for Standardization (ISO).
6 0
3 years ago
For our computer club in school, we are making a discord server and seeing who can get the most members. I am making an Anime Se
Gwar [14]

Answer:

misteragua#1874

Explanation:

5 0
3 years ago
When working with a large worksheet, you can split the window into ____ panes.?
krek1111 [17]
When working with a large worksheet, you can split the window into two or four panes.
5 0
3 years ago
Other questions:
  • Which of the following describes a hash algorithms ability to avoid the same output from two guessed inputs?A. Collision avoidan
    12·1 answer
  • In this story, the reader is strongly encouraged to believe that Skidmore is guilty of poisoning his brother Manchester. Explain
    6·1 answer
  • Jason is computer professional who has access to sensitive information. He shares this information with another organization in
    8·1 answer
  • Help, please!! A file named "games.txt" exists and has 80 lines of data. You open the file with the following line of code. aFil
    6·1 answer
  • Que son los sistemas de control con retroalimentacion
    10·1 answer
  • What are the reasonsfor documenting business rules​
    6·1 answer
  • How many digits are in the binary number system? Explain why.
    11·2 answers
  • This is a glitch ? 


 










































    14·1 answer
  • An IT department receives a shipment of 20 new computers, and Alice has been assigned the task of preparing them for deployment
    12·1 answer
  • Which web-authoring software enables users to create sophisticated web pages without knowing any html code?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!