Advertisements
Advertisements
Question
The earth spins on its axis completing one rotation in a day. The earth revolves around the sun in 365 days to complete one revolution. What is the Java concept depicted in the given picture?

Options
Array
Condition
Nested loop
While loop
MCQ
Advertisements
Solution
Nested loop
Explanation:
A nested loop is a loop inside another loop. The picture shows a 24-hour rotation repeating for each of the 365 days (inner 24-hour loop runs for every iteration of the outer 365-day loop), which matches the nested-loop concept in Java.
Example: for(int day=1; day<=365; day++) for(int hour=1; hour<=24; hour++) { … }.
shaalaa.com
Is there an error in this question or solution?
2025-2026 (March) Official Board Paper
