Java collection program showing error - Stack is abstract, cannot be instantiated -
import java.util.*; public class stackdemo { public static void main (string[] args) { stack st = new stack(); } }
while running code on jcreator jdk 1.6 error occured -
stack abstract; cannot instantiated stack st = new stack();
otherwise program runs on online compilers http://www.compileonline.com/
please help.
try do:
java.util.stack st = new java.util.stack();
you have abstract class called stack
in project.
note stack
raw type, don't forget infer generic type arguments.
Comments
Post a Comment