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
bija089 [108]
4 years ago
9

What is displayed on the console when running the following program?

Computers and Technology
1 answer:
uranmaximum [27]4 years ago
7 0

I guess there should be the program code in your question. I presume that the complete version of your question is the following:

What is displayed on the console when running the following program?

public class Test {

 public static void main(String[] args) {

   try {

     System.out.println("Welcome to Java");

     int i = 0;

     int y = 2 / i;

     System.out.println("Welcome to HTML");

   }

   finally {

     System.out.println("The finally clause is executed");

   }

 }

}

A.  Welcome to Java, then an error message.

B.  Welcome to Java followed by The finally clause is executed in the next line, then an error message.

C.  The program displays three lines: Welcome to Java, Welcome to HTML, The finally clause is executed, then an error message.

D.  None of the above.

Answer to the complete question with explanation:

B.     Welcome to Java followed by The finally clause is executed in the next line, then an error message

After entering <em>try/catch</em> block program will output <em>"Welcome to Java"</em>.

Then <em>ArithmeticException</em> will be raised at line:

<em>int y = 2 / i;</em>

The reason is division by <em>0</em> because <em>i = 0</em>.

After that <em>finally</em> clause will be executed despite exception thrown which will output <em>"The finally clause is executed"</em>.

There could be a chance that you have modified answers to your question. In that case:

Answer to the original question:

a. Welcome to Java,

c. The finally clause is executed, then an error message.

You might be interested in
Rachel needs to include a new organizational chart in her project. Which type of illustration should she use?: *
Dmitry_Shevchenko [17]

Answer:

Option C

Explanation:

The type of illustration used by Rachael to add a new organizational chart is SmartArt Graphic.

In this tool, the information or data or ideas a person uses in the project are represented visually.

The different layout choices like organizational charts, etc enables a person to select the one that fits the information provided in the project.

Some are design to convey particular form of messages or information while the others are used for simple purposes like highlighting the appearance of texts or bullets.

4 0
3 years ago
Add me on Pokemon go, my trainer code is 5584 3300 5313
evablogger [386]

Answer:

no want it

Explanation:

7 0
3 years ago
How is hardware different from sofware?
ExtremeBDS [4]

Answer:

Computer hardware is any physical device used in or with your machine, whereas software is a collection of code installed onto your computer's hard drive. For example, the computer monitor you are using to read this text and the mouse you are using to navigate this web page are computer hardware.

All software utilizes at least one hardware device to operate. For example, a video game, which is software, uses the computer processor (CPU), memory (RAM), hard drive, and video card to run. Word processing software uses the computer processor, memory, and hard drive to create and save documents.

6 0
4 years ago
Becca is working on a program that will store data. The program will need quick access to data and data persistence is not impor
tester [92]

Answer:

A developer wants to take existing code written by another person and add some features specific to their needs.

Explanation:

pls Mark as Brain list

3 0
3 years ago
"during the ________ stage of system development, system specifications that were prepared during the design stage are translate
Paraphin [41]
The correct answer is programming
Hope this helps! :)
5 0
4 years ago
Other questions:
  • You administer a Microsoft SQL Server database that supports a banking transaction management application. You need to retrieve
    5·1 answer
  • Please help I’ll give you 10 points
    8·2 answers
  • Predictive coding software leverages .............................when experts review a subset of documents to teach the softwar
    15·1 answer
  • Derived Classes Warrior Stores the warrior's allegiance as a string. The warrior does not attack warriors that have the same all
    14·1 answer
  • What does a computer do with what it receives from the interpreter?
    14·1 answer
  • Write a function to output an array of ints on a single line. Funtion Should take an array and an array length and return a void
    9·1 answer
  • What is an important fact about databases?
    7·1 answer
  • Assume that you have implemented a sequence class. Describe the mySequence object (i.e., items with the correct order and the po
    9·1 answer
  • How to enhance the video to full screen in filmora
    15·1 answer
  • How would you write out the Python code to PRINT the answer to 5 times 2?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!