Hi,
Thanks for reply... I actually had the following line of code:
choice = Integer.parseInt(System.in.read());
I thought, the above would convert "character" to "int". But, the output was as follows:
1 : push a onto b
2 : push a over b
3 : stack a onto b
4 : stack...
Hi,
Consider the following program:
try {
int choice = 0;
while (choice != 5) {
System.out.println(" 1 : push a onto b ");
System.out.println(" 2 : push a over b ");
System.out.println(" 3 : stack a onto b ");
System.out.println(" 4 : stack a over...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.