public class Test{
    public static void main(String[] args){
	char[] list={'A','B','C','D','E','F','G','H','I','J'};
	int city=5;

	for(int i=0;(i<10&&i!=city);i++){

I want print 0 to 10, excluding 5.

But when i code it like this, it only prints up to 4 and exits the loop without printing 6 to 10.

How should i code it?