Write a Java Program to display the 10 (ten) city names using the command-line arguments.

 

class CmdCityName
{   
    public static void main(String a[])
    {       
        for(int i=0;i<a.length;i++)
        {
        System.out.println("City-->" +a[i]);
        }
    }
}

0 comments:

Post a Comment

Digital Marketing

Subscribe to RSS Feed Follow me on Twitter!