aspose file tools*
The moose likes Java in General and the fly likes Object Creation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Object Creation" Watch "Object Creation" New topic
Author

Object Creation

susha pillu
Greenhorn

Joined: Jul 25, 2001
Posts: 8
Why
Collection l = new ArrayList();
is allowed but not
List l = new ArrayList();
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

If the error you get is:
l is already defined in [ wherever you've defined it ]

Then your problem is you've used the same variable name twice. Otherwise, I can compile this:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object Creation