• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between List and ArrayLists  RSS feed

 
Thilina Gunawardane
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HIii All......

I have some doubts over Lists and ArrayList......
What is the big difference between those 2 ???

Its better if You can explain me with a example or much more simply...........

Thanks for spending your valuable time With me....
Waiting for a reply soon..
Regards.
Thilina
 
Devaka Cooray
Marshal
Posts: 5650
765
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you mean the difference between java.util.List and java.util.ArrayList ? If that so, the main difference is that List is an interface and ArrayList is a class that implements the List interface.

Devaka
 
Thilina Gunawardane
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope Brother.....
I just want to know how does it work.........In here actually I don't know much about Interfaces either.....
Can you help me with a simple example....... ???
Not about Interfaces .... about the usage of this List and ArrayLists ......

Thank you for your valuable time.......
Regards,
Thilina
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about the Java™ Tutorials?
 
Wouter Oet
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And check out the javadoc for java.util.List and java.util.ArrayList.
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thilina Gunawardane wrote:Nope Brother.....
I just want to know how does it work.........In here actually I don't know much about Interfaces either.....
Can you help me with a simple example....... ???
Not about Interfaces .... about the usage of this List and ArrayLists ......


That's like wanting to build an upper floor without laying a foundation. There's no way you can
know how does it work
without first understanding interfaces.

And it looks like you'll shortly run out of dots. Here, have some of mine, I rarely use more than one at a time and never more than 3 .
.................................................................................................................................
.................................................................................................................................
.................................................................................................................................
.................................................................................................................................
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote: . . . And it looks like you'll shortly run out of dots. . . .


I reused some of your dots, Darryl
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!