What is useful when same operations are to be performed on various elements of the similar type in Java?
(A) Array
(B) String
(C)if..then
(D) while
Answers
Answered by
2
✔✔
Answered by
0
Option (A) Array is the right answer. Using array same operations can be performed on various elements of a similar type.
- An array helps the programmer to keep unlimited data of one type.
- And all the elements are kept in continuous memory location only.
- To define the string values using data type is the String.
- If- then is used as a conditional statement.
- While is also a loop whose purpose is to execute a group of code based on a condition.
- Since an array contains more than one data of a unique type it also allows to perform the same operation on all of the elements in the array.
Similar questions