Question: Create in BlueJ. Programming Exercise Type, compile and run the following code. public void printTicket() { int a=50,b=20, result=0, finalresult=100; result=a*b; // Printing System.out.println(##########################); System.out.println(#
Create in BlueJ.

Programming Exercise Type, compile and run the following code. public void printTicket() { int a=50,b=20, result=0, finalresult=100; result=a*b; // Printing System.out.println("##########################"); System.out.println("# Result of my calculation"); System.out.println("# Result = "); System.out.println("#" + price + " US Dollars."); System.out.println("###########################"); System.out.println(); = // Update the final result with result of calculation. finalresult finalresult + result; // clear the balance. System.out.println("final result" + finalresult); System.out.println(); }
Step by Step Solution
There are 3 Steps involved in it
To run the code in BlueJ lets first correct and complete the provided code There are some syntax err... View full answer
Get step-by-step solutions from verified subject matter experts
