Computer Applications

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?

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. ICSE 2025 Computer Applications Solved Question Paper.
  1. Array
  2. Condition
  3. Nested loop
  4. While loop

Java Nested for Loops

4 Likes

Answer

Nested loop

Reason — The Earth performs two repeated motions:

  • it rotates on its axis once every day, and
  • it revolves around the Sun in 365 days.

This means that for one complete revolution, the rotation is repeated many times. One activity is taking place repeatedly within another activity.

In Java, such a situation is represented by a nested loop, where:

  • the outer loop represents the revolution of the Earth around the Sun, and
  • the inner loop represents the daily rotation of the Earth on its axis.

Hence, the Java concept illustrated in this scenario is nested loop.

Answered By

2 Likes


Related Questions