The if statement evaluates a condition and if the result is true then it runs the line of code that follows it. Here is an example of how to test if the value of a variable called I is equal to 5 :public class Decisions{ public static void main( String [ ] args )
{
int i = 5 ; ...