Java Reference
In-Depth Information
compiler errors that are dicult to browse. Programmers often used what
is called an integrated development environment to increase the productivity
cycle of writing programs. The most famous one is called Eclipse 13 .Itis
free of charge and used worldwide. Moreover, Eclipse is written using Java
itself. Another free recommended IDE is JCreator . Using these IDEs, it is
easy to compile and execute programs using the keyboard function F1-12 keys.
Moreover, when the compiler reports a list of bugs, one can just click on the
bug line to directly access the corresponding part of the source code. IDEs
also help nicely indent code and highlight reserved keywords with various user
personalized colors. It provides many functionalities (like expanding/shrinking
code capabilities) to help navigate into codes. For example, looking at
Figure 1.2, we would have found the bad closing comment even before compiling
that code since the code would not have been nicely colored: That is, some
instructions would have been colored using the comment green color instead of
the regular black color.
1.11 Exercises
1.11.1 Note to instructors
The exercise section is primarily designed for a two-hour machine session
with small groups of students. For some of the students, the first session
will also be their very first hands-on experience using a Unix OS machine;
Indeed, universities often provide a Linux-based park of consoles. 14 It is thus
worthwhile describing the basic OS commands like cd , mkdir , pwd , ls , and job
task commands. For Windows users, we recommend the JCreator v3.5 free
integrated development environment. 15
In this chapter, we have described the very basics for writing simple Java
programs that calculate formulas. We have provided an overview of the
framework for developing Java applications.
For this first exercise session, it is thus worth spending some time to get students
familiar with the programming environment (usually on Windows or Linux
operating systems). For example, as a warm-up:
- Create a simple Java source code that computes and prints to the output
sin 6 . Compile this code and execute it.
13 http://www.eclipse.org/
14 At Ecole Polytechnique (Paris, France), we use the KDE environment
( http://www.kde.org/ ) withthe Nedit text editor ( http://www.nedit.org/ ) .
15 Available for download at http://www.jcreator.com/download.htm
 
 
Search WWH ::




Custom Search