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
Cerrena [4.2K]
4 years ago
7

If a file is opened for reading and the file does not exist,what action is taken?

Computers and Technology
1 answer:
worty [1.4K]4 years ago
8 0

Answer:

C)An error message is issued.

Explanation:

If we try to open a file for reading when that file does not exist, we will get an error message.

For example, in Java we will encounter a FileNotFoundException as in the code below:

       try {

           FileInputStream fis = new FileInputStream("myFile.txt");

           DataInputStream dis = new DataInputStream(fis);

           BufferedReader br = new BufferedReader(new InputStreamReader(dis));

           String str = null;

           while ((str = br.readLine()) != null) {

               System.err.println(str);

           }

       } catch (FileNotFoundException e) {

           e.printStackTrace();

       }

If the file myFile.txt does not exist we can expect to see an exception stack trace corresponding to FileNotFoundException.

You might be interested in
How can earn more answer from brainly less than two minutes, please
Andrei [34K]
You have to answer other people’s questions.
6 0
4 years ago
The purpose of __________________ is to isolate the behavior of a given component of software. It is an excellent tool for softw
OLga [1]

Answer:

d.) black-box testing

Explanation:

Software testing can be regarded as procedures/process engage in the verification of a system, it helps in detection of failure in the software, then after knowing the defect , then it can be corrected. Black Box Testing can be regarded as a type of software testing method whereby internal structure as well as design of the item under test is not known by one testing it. In this testing internal structure of code/ program is unknown when testing the software, it is very useful in checking functionality of a particular application. Some of the black box testing techniques commonly used are; Equivalence Partitioning, Cause effect graphing as well as Boundary value analysis. It should be noted that the purpose of black-box testing is to isolate the behavior of a given component of software.

3 0
3 years ago
Before you ever buy your first stock or bond, it's important to understand what type of investor you are. This depends on a numb
Oksi-84 [34.3K]

Answer:

Moderate investor

Explanation:

The moderate investors are most popularly known as 'Balanced investors'. They accepts the risk to principal and they adopt the balanced approach. They mainly uses a mixture of bonds and stocks.

They values the reducing risks and then enhancing the returns equally. They accepts modest risks so as to ensure higher long term returns.

6 0
3 years ago
A user calls your help desk and says that he is trying to configure his Word document so that the text within his paragraphs is
katrin [286]

Answer:

The best answer would be

Explanation:

To access this command ...

Select the Format tab - Properties - Paragraph properties - Bleeds and spaces

7 0
4 years ago
After this week im gonna be moderator who ever needs help let me know
Sav [38]

Answer:

ok

Explanation:

thanks, for offering help through here. Have a nice day.

4 0
3 years ago
Other questions:
  • What is computer virus?
    8·1 answer
  • To set up a slide show you should do all of the following except ______.
    9·1 answer
  • Your boss asks you to work through the weekend to install new software on the applications server that serves up applications to
    15·2 answers
  • What is a life cycle
    15·2 answers
  • Date criteria are automatically enclosed in ____ when entered in a query design.
    11·1 answer
  • Why computer is known as data processing system?
    14·1 answer
  • Write python code that does the following: Ask the user to enter as many as number they want; Then find the sum and the average
    10·1 answer
  • Convert the decimal number 164 into the equivalent 8 bit binary number. ​
    11·1 answer
  • The pinky finger on the right hand types _____.
    15·2 answers
  • Which graphic file format would you choose if you needed to make an animated graphic for a website?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!