aspose file tools*
The moose likes Beginning Java and the fly likes java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java" Watch "java" New topic
Author

java

pawan sharma
Greenhorn

Joined: Feb 12, 2001
Posts: 7
what is main difference between array ana arraylist.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
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


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1859
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

Joined: Jan 07, 1999
Posts: 6920
I've moved this post to Java in General (beginner)


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java