I am using beanshell and i want to use arraylist
My code -
import java.util.*;
List test= new ArrayList();
test.add("Last Name");
But I am getting following exception
Caused by: org.apache.bsf.BSFException: BeanShell script error:Typed variable declaration :
Attempt to resolve method: add() on undefined variable or class name: test: at Line: 206
Any idea what is causing the problem?
Thanks
Try ArrayList test = new ArrayList();
That worked fine for me.
Guess that the BeanShell doesn't work with polymorphism.