0

It is the basic doubt that I am asking. Before asking here I asked with some of my colleagues and even with google but none returned me the answer which convinced me. So please anyone clarify my doubt. Thank you.

4

1 に答える 1

1

yes. private is an access modifier, as you might have learned that restricts member to be access just within declaring scope. So as a member of another class, private class can be accessed in that class only.

Note that the top level classes can never be private

class Test {
private class TestInner{

}
....
TestInner ti = new TestInner();
....
}
于 2013-09-02T10:28:06.560 に答える