import java.util.Arrays;

class States {
    public static void main(String[] args) {

        // State names

        String[] states = {"California,", "Alabama,", "Arkansas,", "Arizona,", "Alaska,", "Colorado,", "Connecticut,", "Delaware,", "Florida,", "Georgia,", "Hawaii,", "Idaho,", "Illinois,", "Indiana,", "Iowa,", "Kansas,", "Kentucky,", "Louisiana,", "Maine,", "Maryland,", "Massachusetts,", "Michigan,", "Minnesota,", "Mississippi,", "Missouri,", "Montana,", "Nebraska,", "Nevada,", "New Hampshire,", "New Jersey,", "New Mexico,", "New York,", "North Carolina,", "North Dakota,", "Ohio,", "Oklahoma,", "Oregon,", "Pennsylvania,", "Rhode Island,", "South Carolina,", "South Dakota,", "Tennessee,", "Texas,", "Utah,", "Vermont,", "Virginia,", "Washington,", "West Virginia,", "Wisconsin,", "Wyoming" };

        // State names in alphabetical order

        Arrays.sort(states);

        // Output

        System.out.println("The 50 States are:");
      for (int i = 0; i < states.length; i++) {
        System.out.print(states[i] + " ");
    }
      // Tyler
      // Corey
      // Brent
    }
}
Related Projects
Schedule a Tour!

Visiting us is the best way to get firsthand information about a Sullivan College of Technology and Design education.

By submitting this form, I agree that the Sullivan College of Technology and Design may call/text me, manually and/or by automated dialing system, at the telephone number or numbers I provided about educational products or services or about other products or services in which the Sullivan College of Technology and Design believes I may be interested. I understand that I am not required to consent or otherwise provide to the Sullivan College of Technology and Design my contact information or agree to be contacted as a condition of purchasing or receiving any products or services from the Sullivan College of Technology and Design.

Start typing and press Enter to search