Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following program contains 9 errors. Correct the errors and submit a working version of the program. The corrected version of the program should produce

The following program contains 9 errors. Correct the errors and submit a working version of the program. The corrected version of the program should produce the following output:

x is 0 x is now 15 x and y are 15 and 16 

public class Oops2 { public static void main(String[] args) { int x; System.out.println("x is " x);

int x = 15.2; // set x to 15.2 System.out.println("x is now + x");

int y; // set y to 1 more than x y = int x + 1; System.out.println("x and y are " + x + and + y); } }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

5. Describe the visual representations, or models, of communication

Answered: 1 week ago