Friday, February 5, 2010

[Java] Re: Java - Array List

 

Wow, I get the distinct smell of a homework problem.

Please don't take offense to this, but do a little research into
ArrayList. If you google ArrayList (GIYF=Google is Your Friend)
you will find plenty of examples that help you traverse an arraylist
and from that you will be able to figure out what to do. If you
really get stuck once you have done that, come back with
"Here is what I tried based on my research . . . "

Loyal

--- In Java_Official@yahoogroups.com, "s4rd59" <s4rd59@...> wrote:
>
> Hi,
> Please could someone help me with the following:
>
> Modify the listNotes method so that it prints a number in front of each note that corresponds to its index in the ArrayList. For example:
>
> 0: Do some shopping
> 1: Wait for postman
> 2: Attend meeting at 10.45
>
>
> This is the listNotes method which I have created so far:
> /**
> * List all notes in the notebook.
> */
> public void listNotes()
> {
> for(String note : notes) {
> System.out.println(note);
> }
> }
> }
>
>
> Thanks
>

__._,_.___
Visit http://aiaiai.com or http://jgame.org for more groups to join.
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
.

__,_._,___

No comments:

Post a Comment