This is how I’m trying to do it:
interface a{}
class b implements a{
a[] array;
new b(){
array={ new aImplementer(), new aImplementer(), new aImplementer()};
}
}
Why can’t I do this? Am I just doing it wrong? Right now the error I’m getting is an illegal start of expression error at the { part of array={
Your syntax is off. I believe you want something like this (Final revision–actually tested this time–then redone after my changes were overridden.)
There, guaranteed to compile or twice your money back 🙂
Also threw in “classes should start with an upper case letter” for no charge.