Return type of iterator() method in java
问题 I am a new-comer in Java and in process of learning. I need a an answer of following question supported with valid theory. Consider the following line- Iterator itr = al.iterator(); where al is some collection object of ArrayList (class) type. I want to know what is here the return type of al.iterator() It is not definitely of a primitive data type, then it could be an object , but since every object belong to a class then it is of which class . Documentation and books etc says it has return