I am a newbie to Java, and as an exercise wanted to WAP a simple program to print required no. of \'*\' characters according to the user. But somehow, the output of this cod
Because you are reading ASCII code of the character from input here:
no_stars = (int)System.in.read();
It should be
no_stars = Integer.parseInt(Console.readLine());