What is the major difference between for
and foreach
loops?
In which scenarios can we use for
and not foreach
and vice versa.
Would it be possible to show with a simple program?
Both seem the same to me. I can't differentiate them.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…