Common Mistakes To Avoid

Understand the common mistakes and errors in order to avoid them.

We'll cover the following

❌ Common pitfalls

The following common mistakes should be avoided:

  • Naming a variable after a keyword (reserved name), e.g., int

  • Declaring a variable as myVar and using it as MyVar throughout the program

  • Using a variable without declaring it

  • Initializing a variable with a value of a different type

  • Trying to update/ change the value of the final type variable

  • Writing var += 2 as var += var + 2

  • Considering var++ to be the same as ++var

  • Dividing a variable by 00

Get hands-on with 1200+ tech skills courses.