Java enhanced for loop multiple variables

Enhanced for loop is meant for looping an array or list without worrying about creating a temporay variable and with old for loop.

In this scenario you should use a map or you should crate a class with two properties in it.
ie AddressBookEntry

Browse More Popular Posts

Leave a Comment