wek
发贴: 2
积分: 0
|
于 2005-09-19 08:20
why wrote: Have you tried to compile that piece of code? (class test has to be declared static) I DON'T THINK SO.
... oops, my mistake... there's no inner class in your example.
Oh,I am sorry that I make a mistake. I should have said that use the static inner class can do it. And here comes the example:
public class TestIner{ public static void main(String args[]){ test.jb(); } static class test{ static int i=1; static void jb(){ System.out.println("hao"); } } }
As you have said that static inner class is not a real inner class. Up to now,I don't know you are right or not.
|