Which form is preferred:
String my = "Which form shall I use?";
Iterator iter = my.iterator();
or
Iterator<String> iter = my.iterator();
I personally preferr the former but in my materials from uni they use the latter.
In the latter form, the Iterator is strongly typed which is preferable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With