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?

- Array
- Condition
- Nested loop
- 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
The output of the statement:
System.out.println(Character.toUpperCase('b') + 2);is:- 66
- 100
- 68
- 98
Consider the following statements:
Computer desktop = new Computer(); Computer Mainframe = new Computer();Name the objects of the class given above:
- Desktop, Mainframe
- desktop, Mainframe
- Computer, Mainframe
- Computer, desktop
In the following method prototype to accept a character, an integer and return YES or NO, fill in the blank to complete the method prototype.
public ............... someMethod(char ch, int n)- boolean
- String
- int
- double
In a calculator which Java feature allows multiple methods named calculate() for the different operations?
- abstraction
- inheritance
- encapsulation
- polymorphism