"unexpected token: void" compiler error
in
Programming Questions
•
3 years ago
Can't figure out why this code is generating a "unexpected token: void" compiler error:
- Subclass foo;
- void setup() {
- size(200, 200);
- foo = new Subclass();
- }
- void draw() {
- }
- public class Superclass {
- String[] names;
- public Superclass(String[] theNames) {
- names = new String[theNames.length];
- for(int i=0; i < theNames.length; i++) {
- names[i] = theNames[i];
- }
- }
- }
- public class Subclass extends Superclass {
- public Subclass() {
- super( { "The One", "The Two", "The Three" } );
- }
- }
1