Source code compilation
An IDE uses the javac compiler installed on your computer to find all Java-language syntax errors. Caught early, such errors are much easier to correct than if they are found after the application is already running in the production environment.
Not all programming languages can be supported this way. It is possible for Java, because Java is a strictly-typed language, which means that it needs to declare a type for every variable before one can use it. You saw int and String types in the examples in Chapter 2, Java Language Basics. After that, if you try to do something that is not allowed with the variable for its declared type, or try to assign another type to it, the IDE will warn you, and you can revisit it or ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access