Thursday, 6 March 2014

java program to count no of words



java program to count no of words



class Count
{ 
public static void main(String args[])
{    int i,c=0;
for(i=0;i<args.length;i++)
{   System.out.println(args[i]);
c++;
}
System.out.println("number of words="+c);
}
}

No comments: