Question: What is the error of the following code? Write the raw code that fixes the code. /******** * This program should print only Odd items

What is the error of the following code? Write the raw code that fixes the code.

/******** * This program should print only Odd items (1, 3, 5, 7, 9) * Hint: use a loop, not only printing the values. *****/

import java.Util.*;

public class Test6{ public static void main(String[] args){ System.out.println("Item " + i); } }

Output:

Item 1

Item 3

Item 5

Item 7

Item 9

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 Databases Questions!