I'm doing an aprenticeship in an IT company as a developer.
When I ask my colleagues if the List<>
item is part of the java core language, they say yes. But for me it looks like an extra feature, which is heavily used, but nonetheless an external resource. For me it's kind of confusing, because I can use the List<>
in a for-each loop like:
for(Object o : objectList){}
So the List<>
has to interact somewhere with the native for
loop, so that it works.
My Questions:
*The List<>
is part of the JDK, and the JDK is external, like the Standard-C-Library for C, right?
*So the Java compiler doesn't know what a List<>
is and also just reads it from the JDK, like any other framework, right?
*If my assertions are right, somewhere in the List.java
(or however it's called) file has to be an expression, that tells the compiler how to use it in a for-each loop?