Just when it is in the for merthod.
if it's outside then showing the value of the needed array.
Also in both case no error is coming..
package com.codegym.task.task07.task0704;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
/*
Flip the array
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int[] array = new int[10];
for (int i=0; i < 10; i++){
array[i] = Integer.parseInt(br.readLine());
}
for (int i = 9; i == 0; i--) System.out.print(array[i]);
}
}