top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Java: If an ArrayList has to be iterate to read data only, what is the fastest way?

+2 votes
234 views
Java: If an ArrayList has to be iterate to read data only, what is the fastest way?
posted Sep 21, 2013 by Vinay Shukla

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button
What is the meaning of iterate, what is your doubt and what you have already tried.

1 Answer

0 votes

This can be done in two ways, using for loop or using iterator of ArrayList,use of for loop is faster than using iterator bcoz value stored in arraylist is indexed access. So while accessing the value is accessed directly as per the index.

answer Sep 22, 2013 by Arvind Singh
Similar Questions
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...