The following doesn't work for me in Java. Eclipse complains that there is no such constructor. I've added the constructor to the sub-class to get around it, but is there another way to do what I'm trying to do?
public abstract class Foo {
String mText;
public Foo(String text) {
mText = text;
}
}
public class Bar extends Foo {
}
Foo foo = new Foo("foo");