Posted by ¸Í¸¸Àç on September 17, 1997 at 16:41:40:
´ë°ÀÇ ÇÁ·Î±×·¥ÀÌ ¾Æ·¡¿Í °°Àºµ¥¿ä. ¿¡·¯°¡ ³³´Ï´Ù.
¾î¶² ¿¡·¯ÀÎÁÙÀº ¾Ë°Ú´Âµ¥, ¾î¶»°Ô °íÃÄ¾ß µÉÁö´Â ¸ð¸£°Ú½À´Ï´Ù.
class A {
int buffer[][][]=new int[10][10][10];
public static void main(String args[]) {
InputStream f=null;
try {
f = new FIleInputStream("aaa");
} catch (FIleNotFoundException) {}
for(int i=0; i<10 ;i+)
for(int j=0; j<10 ;j++)
for(int k=0; k<10; k++)
try {
buffer[i][j][k] = f.read(); // error occur !!!
} catch (IOException e) {}
. . .
. . .
}
}
Can't make a static reference to nonstatic variable ~ À̶ó´Â ¿¡·¯°¡ ³ª¿À°Åµç¿ä.
ÇØ°áÃ¥À» °¡¸£ÃÄ ÁÖ½Ã¸é °í¸¿°Ú³×¿ä..