On Aug 16, 8:17 pm, henry joseph <[email protected]> wrote:
> Hi,
> Even when i start with i= 0, i still dont get the exact number of names 
> entered on the command line..
> here is my code:
Try to paste your code from NetBeans, it will be formated. This is
almost incomprehensible.

>
> public class BuiltInClass {
>        public static void main(String[] args) {        if(args.length!=5){
I'll guess you want 5 names here.
            System.out.println("please, names must be 5 on command
line!!");            System.exit(0);        }        String []arr =
new String[7]; 
But why 7 here?
       for(int i = 0; i<args.length;i++)
Here you begin with 0.
         arr[i] = args[i];        for(int i = 1; i<arr.length;i++)
But why here suddenly with 1

Well, as far as I can understand this kilometer-code.

Michèle Garoche





          System.out.println(arr[i]+ " ");        
 generateNewName(arr);
> here is what i get at my output...
> run:george Hney Rroy Ayilla null null e n r Exception in thread "main" 
> java.lang.NullPointerExceptiony         at 
> BuiltInClass.generateNewName(BuiltInClass.java:43)        at 
> BuiltInClass.main(BuiltInClass.java:21)Java Result: 1BUILD SUCCESSFUL (total 
> time: 3 seconds)
>
> i still cant get my zhenny to show.. dont know why, any idea?
>
> Dont look at where you fell but where you slipped!!!

-- 
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

Reply via email to