Two Plus Two Older Archives

Two Plus Two Older Archives (http://archives2.twoplustwo.com/index.php)
-   Computer Technical Help (http://archives2.twoplustwo.com/forumdisplay.php?f=46)
-   -   Java help (http://archives2.twoplustwo.com/showthread.php?t=364455)

DireWolf 10-24-2005 03:58 PM

Java help
 
I just beginning programming/java so bear with me.

Im trying to create a list.

i imported List with:

import java.util.List;

In a method i try to create my list with:

List<Character> chars = new List<Character>();

(This is Java 1.5, so i have to include the type of List when creating it)

The error message i get is:

java.util.List is abstract; cannot be instantiated


Anyone have any ideas??
thanks

StevieG 10-24-2005 04:12 PM

Re: Java help
 
List is an interface

you want to use a class that implements the interface like
ArrayList, LinkedList, or Vector.


All times are GMT -4. The time now is 12:06 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.