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
Get step-by-step solutions from verified subject matter experts
