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
yawa3891 [41]
3 years ago
12

Assume that input file references a Scanner object that was used to open a file. Which of the following while loops shows the co

rrect way to read data from the file until the end of the file is reached?a. while (inputFile != null)b. while (!inputFile.EOF)c. while (inputFile.hasnextInt())d. while (inputFile.nextLine == " ")
Computers and Technology
1 answer:
Brut [27]3 years ago
4 0

while (!inputFile.EOF) loops shows the correct way to read data from the file until the end of the file is reached.

b. while (!inputFile.EOF)

<u>Explanation:</u>

Normally to read an input files as loop the program reads till end of file mark been seen.  A loop been executed till an EOF is reached.

End user has to write a logic in software languages  which should have a loop and ready a bit or set of bits which depends of end user technology and stop reading till end of file which is called  EOF = true.  

If EOF is not true then end user program loop never ends and program is either hang or bug or goes to really task.

End user has check either EOF = True or files size reach to end of bytes. Whichever comes first.

Otherwise if EOF is not true then it is corrupted files.

You might be interested in
Select the correct answer.
storchak [24]

Answer:

B. Planning

Explanation:

I believe the developer establishes the project goals in the planning phase.

6 0
4 years ago
Can a syntax error occur in a block-based code? Why or why not?
grin007 [14]

Answer:

Syntax errors are not able to occur in block based code, so they cannot be transitioned from block to text and can cause issues.

8 0
4 years ago
Read 2 more answers
Why do I need to get brainly plus when I already created an account
allochka39001 [22]

Answer:

They want more money I suppose

7 0
3 years ago
Read 2 more answers
What Defines Form?
Aleks04 [339]
The shape and texture defines form.
3 0
4 years ago
How many schools are there total at Gaineseville tx
Ahat [919]
There are ten schools total

7 0
3 years ago
Read 2 more answers
Other questions:
  • List 5 major steps to make a bank deposit
    6·1 answer
  • In the context of web and network privacy, an acceptable use policy is _____.
    15·1 answer
  • Public class Robot
    15·1 answer
  • A collection of methods that can be used by any class, as long as the class provides a definition to override the collection's a
    5·1 answer
  • What is Administrator windows 10
    8·1 answer
  • Garrett wants to search through a csv file to find all rows that have either the name John or Bob in them and display them out t
    9·1 answer
  • When you use the tilde operator (~ in a url for the attribute of a server control, it represents the _____ directory of the webs
    5·1 answer
  • Which term is used to define the wires on a motherboard that move data from one part of a computer to another?
    13·1 answer
  • The objective of this task is to use Scapy to estimate the distance, in terms of number of routers, between your VM and a select
    10·1 answer
  • ________ involves disconnecting individual users from their selected internet service providers and redirecting them to illegiti
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!