Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c. Click Compile button to compile it, it should have no syntax error, RunError Class Edit Tools Options Compile Undo Cut Copy Paste Find... Find

image text in transcribed

image text in transcribed

c. Click Compile button to compile it, it should have no syntax error, RunError Class Edit Tools Options Compile Undo Cut Copy Paste Find... Find Next Close Source Code * Write a description of class RunError here. * Rauthor your name) * @version (a version number or a date) / public class RunError public static void main (String[] args) int i = 10, ) = 15, k = 5; int out; Qi Zhu out - (k/(1/3)); System.out.printf("The value is d", out); Class compiled - no syntax errors saved Fig. 2 Source code of RunError.java d. Then right click RunError.java, select the choice "void main(String []" to run it, it will return java.lang. ArithmeticException: / by zero at RunError.main(RunError.java:15) Fig. 3 The Output window for RunError.java e. The reason why you have this error because the denominator of the division is zero. Submission 3: How to fix this to get a valid output? Hint: change the order. COSC 3317 OOPD Dr. Zhu 4 Submission 4: After you fixed the run time error, run this program, and submit the screen shot of your execution result

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is cultural tourism and why is it growing?

Answered: 1 week ago