Hi all.
i need your help in this program,in which i have to get the newname
which comprises of the second alphabet of each of the name passed
through command line arguments.
the code that I tried out is given below
public class builtinclasses {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
if(args.length==0)
System.exit(0);
for(int i=0;i<args.length;i++){
System.out.println(args[i]);
}
System.out.println("New name is: ");
generateNewName(args);
}
// TODO code application logic here
public static void generateNewName(String[] args)
{
for (int i=0;i<args.length;i++)
{
System.out.print(args[i].charAt(1));
}
}
}
please help me to modify this code to get the desired result.
Thanks and Regards
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---