- 1

Cannot find symbol

Trying the Java version of the popsicle challenge in code coach and can't get any of the output formats I know of to work I tried both console.log and document.write. is there something else I'm missing? https://code.sololearn.com/cT920ePcpibW/?ref=app

18th Oct 2021, 5:28 PM
David McVey
5 Respuestas
+ 4
Replace document.write with System.out.print
18th Oct 2021, 5:44 PM
Pariket Thakur
Pariket Thakur - avatar
+ 3
JavaScript and Java are two different programming languages, document.write is used in JavaScript to write something on document/html page. You have to use System.out.print("content"); for output in Java.
18th Oct 2021, 5:34 PM
Rupali Haldiya
Rupali Haldiya - avatar
+ 2
David McVey Are you learning Java or JavaScript? console.log and document.write are the parts of Java? Don't learn multiple languages together otherwise you will always face problem and result would be 0% learning.
18th Oct 2021, 5:38 PM
A͢J
A͢J - avatar
+ 1
Ah okay, I'm learning JavaScript, didn't realize that the code coach only has Java and that they are two different languages.
18th Oct 2021, 8:05 PM
David McVey
+ 1
David McVey Just focus on only one language at one time.
18th Oct 2021, 8:11 PM
A͢J
A͢J - avatar