On Sun, Aug 9, 2009 at 1:25 AM, Ashok A V<[email protected]> wrote: > Hi Devika, > > Can you try passing more than one name to the program argument like > java builtinclasses Ashok Asha Kumar > and then you will get the output : > > Ashok > Asha > Kumar > New name is: > ssu > > Thanks, > Ashok A V > > On Sun, Aug 9, 2009 at 1:07 AM, pacior<[email protected]> wrote: >> >> Hey, >> You have to pass, not one value, but two values. >> Look, You defined method which name is test and You can pass only what >> You can. >> Wish You Luck, finding answer. >> Regards >> Grzegorz Patynek >> >> On Aug 8, 7:24 pm, devika shukla <[email protected]> wrote: >>> 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 >> >> >> >> > > > > -- > Victory belongs to the most persevering. > - Napoleon >
-- Victory belongs to the most persevering. - Napoleon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
