Program uses both char and ascii value, when I only want it to use char
<p>I'm writing a simple level creator based on characters in a text file. It's not really a problem at all, but I was wondering why I have to check for the ASCII value of '1' rather than the char '1' in order to return true, while the earlier usage of the char works fine.</p>

<p>Here is the code : </p>

<pre><code>package com.side.side;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Arrays;

public class LevelGenerator {



    public LevelGenerator() throws IOException{
        char[][] map = new char[4][4];
        int i = 0;
        int j = 0;
        String thisLine;
            BufferedReader reader = new BufferedReader(new FileReader("C:/Users/Downloads/Desktop/eclipse/level.txt"));
            while((thisLine = reader.readLine()) != null){
                while(i &lt; thisLine.length()){

                    map[j][i] = thisLine.charAt(i);
                    i++;
                    }
                if(i==thisLine.length()){
                    j+=1;
                    i = 0;
                }

                System.out.println(thisLine);

            }
            String maplis = Arrays.deepToString(map);
            System.out.println(maplis);

        for(int x = 0;x&lt;=3;x++){
            for(int y = 3;y&gt;=0;y--){
                if (map[y][x] == 1){System.out.println("true");}
                else{System.out.println("false");}
            }
        }
    }
}
</code></pre>
