in JAVA by
Q:
Can I write my own container class and use it in the for-each loop?

1 Answer

0 votes
by

Yes, you can write your own container class. You need to implement the Iterable interface if you want to loop over advanced for loop in Java, though. If you implement Collection then you by default get that property.

Click here to read more about JAVA
Click here to read more about Insurance

Related questions

+1 vote
asked Jan 19, 2020 in AWS by Robindeniel
0 votes
asked May 26, 2020 in Amazon Elastic Compute Cloud EC2 by Indian
0 votes
asked Mar 10, 2020 in C Plus Plus by rahuljain1
0 votes
asked May 22, 2020 in Amazon Elastic Compute Cloud EC2 by Indian
0 votes
asked Oct 5, 2020 in Web Hosting by Robindeniel
...