Class accessing inner class privates?

Posted by aloh on Stack Overflow See other posts from Stack Overflow or by aloh
Published on 2010-05-09T05:13:20Z Indexed on 2010/05/09 5:28 UTC
Read the original article Hit count: 267

Filed under:
Class Outer
{
 ...
    private class Node
    {
      private T data;
      ...

      private T getData()
      {
         return data;
      }
    }
}

What's the purpose of using set and get methods if the outer class can access inner class private members? What's the purpose of making inner classes private? Package access?

© Stack Overflow or respective owner

Related posts about inner-classes