|
An if statement can be followed by an optional else if...else statement, which is very useful to test various conditions using single if...else if statement.
When using if, else if, else statements there are a few points to keep in mind.
Note For Video 1: If you get a compilation error with a simple implementation of printf, Check that the Compiler compliance level is set to at least 1.5 for your project: Project > Properties > Java Compiler if Enable project specific settings is not set, use the Configue Workspace Settings... link on that page to check the global Compiler compliance level. ( or just use good old println) >> Click Here << to learn about displaying text using printf() method in Java. |
Science
|
Technology
|
Engineering
|
Mathematics
|
Empowerment
|