/** * Prints facts about the number of stars and stripes * on the US flag from 1777 to 2016 * * Illustrates: * - The basics of declaring, initializing, * and assigning to primitive variables of type integer * * @author alchambers */ public class USFlag{ public static void main(String[] args){ int numStars = 13; System.out.println("In 1777, there were " + numStars + " stars on the US flag"); numStars = 20; System.out.println("In 1818, there were " + numStars + " stars on the US flag"); numStars = 48; System.out.println("In 1912, there were " + numStars + " stars on the US flag"); numStars = 50; System.out.println("In 2016, there were " + numStars + " stars on the US flag"); int numStripes = 13; System.out.println("There have always been " + numStripes + " stripes on the US flag"); } }