File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java

 
pawan sharma
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is main difference between array ana arraylist.
 
Bosun Bello
Ranch Hand
Posts: 1510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's easier to just check out the API. I know arrays contains various methods for manipulating arrays. ArrayList on the other hand is just like a vector, but probably has a few more methods.
Bosun
 
Rahul Mahindrakar
Ranch Hand
Posts: 1868
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pawan,
Welcome to Javaranch.
This is not an apt forum for your question. You can post similar questions in Java in General forums. Anyhow the following differences some to my mind immediately

Array
Can contain primitive types and Objects
Non Resizable
Supported at the java language level
all contained components of same type
ArrayList
Can only Contain Objects
Resizable-array implementation
Part of Collecions framework thus you have to import java.util to use it
all contained components may be of same type or different types.
------------------
Regds.
Mahindrakar
 
Frank Carver
Sheriff
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've moved this post to Java in General (beginner)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic