01:198:111 Lecture Notes - Lecture 4: Camel Case, Semicolon
01:198:111 verified notes
4/28View all
Document Summary
Variable- an entity that can change its state or value. X is the name of the variable and int is the type. Start with uppercase for all letters of subsequent words, don"t use spaces or special characters. All curly brackets and if should be in line with each other. If there is another if statement inside an if statement do another three spaces. Every java statement must end with a semicolon - rule. Do not put right after an if or while statement. Or else it will always run whatever is inside the statement every time. = means assigned, so x=x+2 is assigned the value of x+2. The old x is the x on the right and the new x is the x on the left. When an x is defined, it means x is a location in a memory, the address of a memory. So in this case it means the location is x + 2 bytes from x.