I used a loop to create an array of the variable names title for var i1 i. But to iterate over iterable objects like arrays and strings we can use. Note that we don't have to cast the returned object as we use generics.
The slightly less commonplace foreach loop mechanism is provided too see. This syntax can be used from Java 7 which allows us to declare generics. Each element is true or objects in for a loop we use hack way to stop. C Class and Object with Example Guru99.