Question: Correcting Syntax Errors The program below contains lots of errors and is horribly formatted. Public class Correct Codelpulic static Void main(String apple)[Int num1:num2:system.out.printi) am testing
Correcting Syntax Errors The program below contains lots of errors and is horribly formatted. Public class Correct Codelpulic static Void main(String apple)[Int num1:num2:system.out.printi) am testing my knowledge":Systemout.printin/" of variables.")System.out.Print"So two variables, "2:System.Out.printin("call them num1 and num2."7.System.out.print1n"hardcode them like so" num1-7: num2-8.System.outprintin"num1-7; num2- 8:/ ");System out printIn add them together, and voila!"kSystem.out printin-get-nun1 +-+ . . num2 +-num2 + num2 +-n Correct this code so that it is properly formatted and prints the following output I am testing my knowledge of variables So I take two variables, call them num1 and num2, hardcode them like so: add them together, and voila! get 7+8-15! (Edit 01/17: Make eference variables in your corrected codel Not every statement is an output statement in this code. In a comment indicate how you fxed this code. (For example) Did you attempt to fix it line by line? Or estimation) how long it took to fix/type in your comment. to fix it line by line? Or did you type it from scratch using the output as a guide. Additionally, Indicate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
