|
The Derived class should be Derived.groovy class Derived extends Base { int[] vs public Derived(vs) { super(vs.length) // correct vs.size as vs.length this.vs = vs } public static void main(String[] args) { int[] vs = new int[5] println vs.length Base b = new Derived(vs); println b.vs } } org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Derived.groovy: 5: the name vs doesn't refer to a declared variab 1 error |
|||||||||||||||||||||||||||||||||||||||||
error msg:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Derived.groovy: 5: the name vs doesn't refer to a declared variab
le or class. The static scope requires to declare variables before using them. If the variable should have been a class check the spelling.
@ line 5, column 9.
super(vs.size)
^
1 error