Method for begginer
<p>try to create new method, but during running its not working
code
this placed on </p>

<pre><code>    class Matrix {
    public static void main (String  args[]) throws IOException {
 ....
    System.out.println("Enter q-ty of matrix elements i= ");
        int gormatelement = 0;
        getchartoint (gormatelement);
...
}
</code></pre>

<p>and after method</p>

<pre><code>            public static void getchartoint (int a) throws IOException{
            BufferedReader bReader = new BufferedReader (new 
                    InputStreamReader(System.in));
            String k = bReader.readLine();
                a =  Integer.parseInt(k);
            }
</code></pre>

<p>this code must get char from console and convert it to int - will be used as q-ty of elements in matrix
where i make mistake?</p>

<p>thnanks to all, especially Lee Meador</p>

<p>do next: 1 - change method :</p>

<pre><code>public static int getchartoint () throws IOException{
    BufferedReader bReader = new BufferedReader (new InputStreamReader(System.in));
    String k = bReader.readLine();
    int a =  Integer.parseInt(k);
    return a;
}
</code></pre>

<p>2 - change code :</p>

<pre><code>System.out.println("Enter q-ty of matrix elements i= ");

    int gormatelement = getchartoint();
    System.out.println(gormatelement);
</code></pre>

<p>all fixed</p>
