358,359 views
37 votes
37 votes
Which xxx completes the code to read every integer from file "data. txt"? fileinputstream inputstream = null; scanner infs = null; int total = 0; inputstream = new fileinputstream("data. txt"); infs = new scanner(filebytestream); while(xxx){ total = total + infs. nextint(); } system. out. println("total: " + total); group of answer choices inputstream. hasnextint( ) total != 0 infs. hasnextint( ) infs. eof( ) == false

User Algalg
by
3.1k points

1 Answer

28 votes
28 votes

Answer:

total+ infs . nex (xxx){total}

Step-by-step explanation:

this is correct theres nothing wrong

User Martin Gergov
by
2.7k points