Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Vi Special Issue On Database And Expert Systems Applications Lncs 7600

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2012th Edition

3642341780, 978-3642341786

More Books

Students also viewed these Databases questions