
ListIterator iter = v.listIterator();
while (iter.hasNext()) {
System.out.println((String)iter.next());
}
World of tricky Core Java Q and A Covering Object Oriented Analysis and Design, JVM Internals,Java Language Fundamentals,Datatypes,Keywords,Operators and Assignments,Identifies,Declarations and Modifiers, Conversion,Casting and Promotion, Flow control,Assertions, Exception Handling and Garbage Collection,Objects and Classes), Basic Packages and their classes,JDBC,JFC Swing,Java Server Pages (JSP), Servlets,EJB,JMS,JNDI etc and Open source technologies like Struts,Hibernate,Spring etc
1 comment:
Thats fine. but want to know its advantages interms of performance like speed. If the list is not dynamic, it is preferred to use the normal way like below and iterate thru:
for(int i=0 ; i< objects.size() ; i++)
Post a Comment