Question: I need to identify the errors and explain and correct code 1 . public class Oops { 2 . public static void main ( String

I need to identify the errors and explain and correct code
1. public class Oops {
2. public static void main(String[] args){
3. int x;
4. System.out.println("x is" x);
5. int x =15.2;
6. System.out.println("x is now + x");
7. int y;
8. y = int x +1;
9. int z;
10. sum(x, y);
11. system.out.println("z are " z);
12.}
13. public static void sum(double x, double y){
14. int sum = x + y;
15. return sum;
16.}
17.}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!