/**
* List all notes in the notebook.
*/
public void listNotes_1(
int i = 0;
for(String note : notes) {
System.out.println(
}
}
/**
* List all notes in the notebook.
*/
public void listNotes_1(
for(int i = 0; i < notes.size()
System.out.println(
}
}
------------
From: "s4rd59"<s4rd59@yahoo.
Date: Thu, Feb 4, 2010 09:05 PM
To: "Java_Official"
Subject: [Java] Java - Array List
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(
}
}
}
Thanks
[Non-text portions of this message have been removed]
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