0

if u will try to run this, while looking at the codes ull know my mistake,
the thing here is when i choose "b"

it will show the balance, the a question like this will open up:
"Would you like to generate bank slip?"
if yes it should go in this part of the code:

else if   (ans == 0); // yes
	 {
			JOptionPane.showMessageDialog(null, "BALANCE INQUIRY \n AMOUNT BALANCE: "+ bal+ "\nPrinting Bank slip.....");
	 }
		
		
	}

but it doesnt, thats my problem please help me
thank you

4
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by hfx642
0

why didn't you keep this in the other thread about this code?
you have two major issues with this code
1.

this

else if (ans == 0);
{
}

is placed within a

if ( ans == 1 )

block, and will therefor never be executed.
2.
the line

else if   (ans == 0);

should not have a ';' at the end. remove it, since it will immediately terminate the if ( ans == 0 ) block.

0

Well... One problem is that you are NOT displaying the code that actually has the issue.
In fact... You are NOT displaying a runnable program.
You have only given an irrelevant snippet.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.