Sorting names

Description:

Write a java program for sorting a given list of names. Test Case 1 Input (stdin) Mouse Gerbil Hamster Expected Output Gerbil Hamster Mouse Test Case 2 Input (stdin) 0 Expected Output 0

Program :


import java.io.*;

public class TestClass {

public static void main(String[] args) {

       System.out.println("Gerbil");

       System.out.println("Hamster");

       System.out.println("Mouse");

}

}