<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.> https://www.codecademy.com/en/courses/learn-java/lessons/conditionals-control-flow/exercises/if-else
<In what way does your code behave incorrectly? Include ALL error messages.>
These are my error messages:
IfElse.java:3: error: class, interface, or enum expected
if (7 < 7) {
^
IfElse.java:7: error: class, interface, or enum expected
} else {
^
IfElse.java:11: error: class, interface, or enum expected
}
^
3 errors
In the beginning of the lesson I deleted that part at the top(I wanted to see what it would do). Then I followed through the lesson like I normally would but it ket giving me errors. That’s when i came here. I previously did JavaScript and I mastered if/else statements and it won’t work here. Just asking, what does this part of the code even do:
public class If {
public static void main(String args) { ?
This is just to clarify.I have no idea what a class or a method is . I just started java and have no idea what those things are. In the beginning I deleted the class part at the top to see if that did anything , and it did. So could someone please just copy and paste the top part of the code for lesson 7 of Conditionals and Control Flow for Java. The only reason why i want someone to copy and paste is because i don’t know what the code I’m missing does or is. I understand what the lesson wants me to learn so copying and pasting the code at the top won’t help me learn anything or cheat. Please help