The exercise is to write a java class (program) called generateNewName
with a main method. You don't have to write seperate method called
generateNewName to do it. Your logic is alright, just need a bit of
refining, use a loop to process the names.  Also, I think the exercise
asks for the full name, so you need to split the full name to get each
first name.

HTH
norman

On Sep 2, 5:00 pm, miga <[EMAIL PROTECTED]> wrote:
> On Sep 2, 7:43 am, "Rene Erwee" <[EMAIL PROTECTED]> wrote:> Hi all
>
> > Please help.  Even though the code below gives the result required, I
> > have not followed the instructions in the assignment i.e. to write a
> > method to achieve the result.
> You should.
> >  I keep on getting errors when I try to
> > write a Static Method called generateNewName() to get the same output.
> > Some pointers, please?
>
> Begin by using loops to get the names, to build the new name, and to
> print it. Then once you're satisfied with it, try to write the method
> to do it. Study the error messages in Netbeans if any, read the
> javadoc, read again the lesson about static methods, and only
> thereafter post par of your code, so that the forum's members help
> you.
>
> > PS: why is it necessary to use methods if the
> > same result can be achieved without it?
>
> Because that's the purpose of a program, never repeat something. Say
> the assignements were to get the 10M names and construct one name with
> it, would you write 10M times String foo = bar; etc...?

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