My code is executing fine. It produced excepted output as actual output. but it show error. i don't why. could you help me.
import java.util.Scanner;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner obj = new Scanner(System.in);
obj.useDelimiter(" ");
int[] array=new int[7];
for(int i=0;i<7;i++){
array[i]=obj.nextInt();
}
for(int i=0;i<7;i++){
System.out.print(array[i]+" ");
}
}
}
The following output I got while submitting my code.
Testcase Status:
>>> error
Input:
2 3 4 5 6 7 8
Expected Output:
2 3 4 5 6 7 8
Actual Output:
2 3 4 5 6 7 8
I had tired different ways. but i got this again & again. help me to clear this problem
after that I noticed empty space is my issue. Now, I fixed it.