Naming variables

Why naming is important As you know, every variable should have a unique name that identifies it. Naming variables can seem easy. However, it is not true. Experienced programmers are very cautious with choosing names for variables, so their code is easy to follow. It is very important, as programmers spend a lot of time reading code written by others. Trust us — your code…

Comments

Here comes a comet… Oh, sorry, a comment – brief but enlightening. So, what exactly are those comments and what do we need them for? Well, essentially, that’s what we call a special text that will be ignored by the compiler. Comments allow you to clarify a piece of code or exclude it from the compilation process (that is, disable it). Throughout this course, we…

Coding style conventions

There’s a question that you bump into when moving from simple single-line programs to more complicated ones: how to write code that is clean and easy to read? This is trickier than it may seem at the beginning, and this is quite important: in real life, programming is a process that involves a lot of people that work together. In fact, you often spend more…

Comments

Inside a Java program, you can write a special text that will be ignored by the Java compiler — known as the comment. Comments allow you to exclude code from the compilation process (disable it) or clarify a piece of code to yourself or other developers. In our materials, we use comments in the theory and practice lessons to explain how and why our code…