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
natali 33 [55]
3 years ago
6

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:
12345 [234]3 years ago
4 0

Answer:

The correct answer to the following question is an option c) while (inputFile.hasnextInt()).

Explanation:

hasnextint() is the function of the scanner class which is "java.util.Scanner".

This method returns the boolean value so the data type of this method is boolean.

Integer values of radix are assumed only when a next token is in the Scanner input and it returns output True.

The other options are false because the input file can be null and the end of file is not equal to the input file and the next line is equal to the space and also the other options are not the object of the scanner class.

You might be interested in
In cell E14, enter a date function that calculates the number of days between the Initial Deadline (cell E10) and the Date Recei
tatuchka [14]

Answer:

The formula to enter in E14 is as follows:

=DAYS(D14,$E$10)

Explanation:

Required

Formula to calculate the number of days between E10 and D14

The syntax to do this is:

=DAYS(end_date,start_date)

So, we have:

=DAYS(D14,E10)

The question requires a mix of relative and mixed references because cell E10 will be constant in calculating the difference for dates in other cells.

In other words, the initial date is constant for all

So, the update formula is:

=DAYS(D14,$E$10)

Notice the $ between in E10; this represents mixed referencing

When dragged to E15 till E68, the formulas in the respective cells will be:

=DAYS(D15,$E$10) .............................. =DAYS(D68,$E$10)

7 0
3 years ago
Suppose you define a java class as follows: public class test { } in order to compile this program, the source code should be st
likoan [24]
Test.java

The classname and the filename need to match (case sensitive).
5 0
3 years ago
Whats the best strategy for avoiding ATM fees?
natulia [17]
You hack the atm that's how
3 0
3 years ago
Read 2 more answers
Write a C++ program that consist
pshichka [43]

Answer:

Explanation:

The object-oriented paradigm; The compilation process Comments; Library inclusions; Program-level definitions; Function prototypes;

The main program; Function definitions Naming conventions; Local and global variables; The concept of a data type;

Integer types; Floating-point types; Text types; Boolean type; Simple input and

output Precedence and associativity; Mixing types in an expression; Integer division and

the remainder operator; Type casts; The assignment operator; Increment and

decrement operators; Boolean operators

7 0
3 years ago
Which of these is NOT an advantage of the impact of computer careers.
nikdorinn [45]
I believe the answer could be the first choice. I'm not quite sure, though
4 0
3 years ago
Read 2 more answers
Other questions:
  • A network engineer is configuring a network to be able to relay IPv6 packets. The network only supports IPv4 and does not have d
    11·1 answer
  • In a process called _____, excel continually reviews the workbook for errors in formulas as you create or manipulate it.
    13·1 answer
  • What is the network id with cidr notation for the ip address 172.16.32.108 with the subnet mask 255.255.255.0?
    10·1 answer
  • A tablet computer transmits a file over a wi-fi link to an access point.
    13·1 answer
  • Which of the following is not an advanced strategy you may use to help you conduct a search on the Internet?
    12·1 answer
  • Your task is to write a C program that measures the latencies of various system calls. In particular, you want to know 1) the co
    5·1 answer
  • #5 Multiple Select Which of the following describes a hardware error? Select 3 options.
    7·2 answers
  • What is the traditional cognitive perspective ofHCL?
    12·1 answer
  • How do you freeze the total cell so that it doesn't change when copied?
    6·1 answer
  • The different languages that follow specific RULES. These languages use commands
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!