- 2

How is this wrong?

So I just started learning Java, and I have encountered a practice exercise that I am unable to complete. Anyways, here is what I am stuck on: public class Program { public static void main(String[] args) { int beer = 64; int whisky = 23; //calculate the sum and output it int result = beer + whisky; System.output.println(result); } } If there are any people out there that are good at Java, if you could explain what I'm doing wrong, that would help a TON. Thank you!

19th Jan 2022, 9:02 PM
Sir Poobs
2 Answers
+ 7
It's System.out.println() not System.output.println()
19th Jan 2022, 9:07 PM
Simon Sauter
Simon Sauter - avatar
+ 4
I don't know java at all. That being said, i used: System.out.println(result); and it worked just fine. Also, fix up those tags. The only relevent one is "java"
19th Jan 2022, 9:06 PM
Slick - avatar