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

Recommended Answers

All 3 Replies

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


else if (ans == 0);

is placed within a

if ( ans == 1 )

block, and will therefor never be executed.
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.

Member Avatar for hfx642

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.