Tuesday, 7 June 2011

Array of Strings


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

String[] greeting = new String[3];

greeting[0] = "Welcome to core Java";

greeting[1] = "by Sateesh";

greeting[2] = "bagadhi";

for(int i=0; i<greeting.length; i++)

System.out.println(greeting[i]);

}

}


No comments: