我正在尝试扩展oscP5库中的oscP5类以进行处理。我已经在我的主要草图中导入了netP5.*和sketch 5.*。但是,下面的代码会产生这个错误:expecting TRIPLE_DOT,found ',。我扩展它的方式有什么问题?我应该在构造函数中添加所有这些参数吗?
class GameClient extends netP5.TcpClient {
int score;
//some more variables
public TcpClient(Object theObject, String, theAddress, int thePort) {
//This is the constructor.
}
//I want to override this function
public void dispose() {
println("dispose() called.");
}
}谢谢你的帮助。
发布于 2011-06-08 11:57:52
请看你的例子:
公共TcpClient(Object theObject,String,theAddress,int thePort) {
在String和theAddress之间有一个逗号,它不属于那里。
https://stackoverflow.com/questions/5580920
复制相似问题