Which is better in terms of performance for iterating an array?
(a) for(int i=0; i<100; i++)
(b) for(int i=99; i>=0; i–)
(c) for(int i=100; i<0; i++)
(d) for(int i=99; i>0; 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
Select the correct answer from above options
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)