[Prévia] [Próxima] [Prévia por assunto] [Próxima por assunto]
[Índice cronológico]
[Índice de assunto]
Mais ainda sobre os statics da vida...
- Subject: Mais ainda sobre os statics da vida...
- From: Daniel Cukier <danicuki@linux.ime.usp.br>
- Date: Sun, 25 Apr 1999 20:46:22 -0300
Professor,
entendi a sua mensagem sobre o static, porém ainda estou com alguns
problemas.
Eu tenho a minha classe hash que seria assim:
class hash{
Page[] vetor;
int hashSize;
Page tempPage;
Page antPage;
hash(int tamanho){
hashSize = tamanho;
vetor = new Page[tamanho];
}
Page getPage(long pageId){
tempPage = vetor[(int)pageId % hashSize];
while ((tempPage!=null) & (tempPage.id != pageId)){
tempPage = tempPage.next;
}
return tempPage;
}
.
.
.
}
Agora o problema:
eu tenho na classe buffer manager isso:
Page hashpos = new Page();
hashpos = hash.getPage(pageId);
porque ao compilar o java me dá a mensagem:
Can't make static reference to method br.usp.ime.jbase.Page
getPage(long) in class br.usp.ime.jbase.hash.
hashpos = hash.getPage(pageId);
^
MEU DEUS!!! EU NAO AGUENTO MAIS ISSO!!!!
Daniel Cukier <danicuki@linux.ime.usp.br>