Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot Instantiate the Type?

807599Mar 25 2007 — edited Mar 26 2007
I have a class(arrayList) and an Interface(ListInterface) and I'm making a new class(Set)

I'm stuck on the constructor
	public class Set {

	private ListInterface data;   // The ADTList to hold the set elements. 
	
	/**
	 * Initializes an empty set.
	 */
	public Set() 
	{
		data = new ListInterface;
	}
this gives the error that it cannot instantiate the type ListInterface, and it doesn't work without the parentheses either.

I dont know what to do, any help?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 23 2007
Added on Mar 25 2007
6 comments
1,999 views