I just started learning Java very recently, coming from a C# background.

When I started using Collections, I noticed that **Arrays.asList()** returns an `ArrayList<T>` object.

What I don't understand, is, however, that according to the code listing at '[docjar](http://www.docjar.com/html/api/java/util/Arrays.java.html "docjar")' (line 2834) labels `ArrayList<T>` as *private*.

How can I be using an object that has been explicitly marked as hidden from me? Or (and this is what I suspect), does *private* have some sort of different meaning to the one I'm assuming?

(Also, I note that that class is marked as static, which also confuses me, but I'll ask that in a separate question)

---

Edit: Example in C# that throws up a compiler error:

```
public class PubClass {
        private class Blah {

        }

        public Blah GetBlah() {
            return new Blah();
        }
}

```

Gives: *Inconsistent accessibility: return type 'Namespace.PubClass.Blah' is less accessible than method 'Namespace.PubClass.GetBlah()'*