InterviewSolution
Saved Bookmarks
| 1. |
Which is better in terms of performance for iterating an array?(a) for(int i=0; i=0; i–)(c) for(int i=100; i0; i++)I had been asked this question in a job interview.Origin of the question is Coding best practices topic in section Autoboxing & Miscellaneous of Java |
|
Answer» Correct option is (b) for(INT i=99; i>=0; i–) |
|