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
Select the correct text in the passage,
sdas [7]

Answer:

The correct sentence is 1.

Explanation:

The most common use of artificial intelligence is email filtering and trading.

4 0
4 years ago
When Clara accesses the programs and documents on her computer by way of icons, she is said to be employing
xxMikexx [17]
<span>D - graphical user interface</span>
5 0
3 years ago
Select the correct answer.
DochEvi [55]

Answer:

ask customers to use strong passwords to protect their accounts

6 0
3 years ago
Read 2 more answers
William’s dad taught him how to write computer codes from a young age. Now, the high school senior wants to work as a programmer
Leto [7]
Personally, I would go with D as it provides the most education and experience which people look for in this line of work they want to hire someone how knows what they are doing and who is well educated 
6 0
3 years ago
Read 2 more answers
If you want a web browser to save your passwords, bookmarks, and other settings so that you can use the browser more readily on
soldi70 [24.7K]

Answer:

sync

Explanation:

:0

5 0
3 years ago
Other questions:
  • What does the acronym API stand for?
    12·2 answers
  • Which of the following statements are true regarding Zyvox? (Select ALL that apply.)
    15·1 answer
  • Due to the wildfires in Australia, the Red Cross has asked for assistance in determining how many trees were destroyed per hecta
    9·1 answer
  • What is referred to by the phrase “Web 2.0”?
    11·1 answer
  • In a dark place you have only a match , a twig , campfire logs , and oil lamp and a candle which do you literally first /
    15·1 answer
  • A client calls to complain that his computer starts up, but crashes when Windows starts to load. After a brief set of questions,
    13·1 answer
  • What are your thoughts on copyright?<br><br> (Write 2 or more sentences)
    9·2 answers
  • Terrance is looking for a storage device to be used for backup storage. The device has to have a large storage capacity and be p
    6·2 answers
  • Photographs, illustrations, and videos are increasingly created an and viewed in digital formats. True or False​
    5·2 answers
  • What year does futurist ray kurzweil believe ai will meet human intelligence?.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!