java int and char
<p>the output here is normal 123 because as known substring in java take from beginIndex to EndIndex -1 but am surprised how char here is understood as 3 (int) because substring take two integers as we know what is the concept behind?</p>

<pre><code>    String x = "12345";
    char a = 3;
    x = x.substring(0, a);
    System.out.println(x);
</code></pre>
