我有以下类扩展:
public class Compute1 extends Compute_node{
private static final Long[] P = new Long[18];
// Constructor, string key.
public Compute1( String keyStr )
{
super( 0, 8 );
setKey( keyStr );
}
public void setKey( integer key )
{
integer i, j, k;
long data;
integer N = 16;
// Initialize P and S.
for ( i = 0; i < N + 2; ++i ){
P[i] = Pinit[i];
}
// XOR the key into P.
j = 0;
for ( i = 0; i < N + 2; ++i )
{
data = 0;
for ( k = 0; k < 4; ++k )
{
data = ( data << 8 ) ;
++j;
}
P[i] ^= data;
}
}
private static final long[] Pinit = new Long[] {
604135516L, 2242044355L, 320440478L , 57401183L,
2732047618L, 698298832L, 137296536L , 3964563569L,
1163258022L, 954160567L, 3193502383L, 887688400L,
3234508543L, 3380367581L, 1065660069L, 3041631479L,
2420952273L, 2306437331L
};
}
但我收到一个错误:
错误:编译错误:方法不存在或签名不正确:[Compute_node].(Integer, Integer) at line 11 column 5
在:
super( 0, 8 );
为什么我不能在这里使用 super 关键字?
我正在使用扩展程序!而且我确实有一个 Compute_node 类!
谢谢