File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Collection & ArrayList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Collection & ArrayList" Watch "Collection & ArrayList" New topic

Collection & ArrayList

ppavya india

Joined: Sep 27, 2004
Posts: 19
Hi all,
I have one small query, what is the difference between following two statments:

1. ArrayList mydata = new ArrayList();

2. Collection mydata= new ArrayList();

Any help would be appreciated.

Thanx in advance.
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
Check this link

Quaerendo Invenietis
ppavya india

Joined: Sep 27, 2004
Posts: 19
Thanx Mani, thanx a lot and looking for your help in future also.
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
ppavya ppavya,

Welcome to JavaRanch!

We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.

I'm thinking that "ppavya ppavya" isn't your real name. Perhaps you could use something different for either the first or last part.

Thanks Pardner! Hope to see you 'round the Ranch!

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: Collection & ArrayList
It's not a secret anymore!