Java program example Running the program produces this result: