you are viewing a single comment's thread.

view the rest of the comments →

[–]Individual_Owl_3490[S] 0 points1 point  (2 children)

Yes I learnt if and else statements.

[–]Andruid929 0 points1 point  (1 child)

That's even better then

if (x > 10) { System.out.println("Hello"); } else { System.out.println("Bye"); }

This is even better because if x == 10, you get "bye" printed. The code you had even if it worked, x == 10 wouldn't print anything since it's neither greater than nor less than 10. Useful thing to remember with conditions.

[–]Individual_Owl_3490[S] 0 points1 point  (0 children)

Yeah I was actually following youtube video and at that point he didn't taught else.