This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java" Watch "java" New topic


pawan sharma

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.

So much trouble in the world -- Bob Marley
Rahul Mahindrakar
Ranch Hand

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

Can contain primitive types and Objects
Non Resizable
Supported at the java language level
all contained components of same type
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.
Frank Carver

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

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: java
It's not a secret anymore!