MCQs > IT & Programming > Java > Imagine you are given 10,000 files, each containing 1 Million integers. Below is the Code which wil sum all of them and give the final result. Will the below mentioned code compiles and throws output? public getSum(String[] file_names) { int sum = 0; for(String f: file_names) { sum = sum + sumOfFile(f); } return sum; }

Java MCQs

Imagine you are given 10,000 files, each containing 1 Million integers. Below is the Code which wil sum all of them and give the final result. Will the below mentioned code compiles and throws output?
public getSum(String[] file_names) {
    int sum = 0;
   for(String f: file_names) {
    sum = sum + sumOfFile(f);
   }
  return sum;
}


Answer

Correct Answer: NO

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it