Computer Science, asked by ShiakhFaiz1226, 3 months ago

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 atrs7391
2

\texttt{What is useful when same operations}\\\texttt{are to be performed on various}\\\texttt{elements of the similar type in Java?}

\textsf{\textbf{(A) Array}} ✔✔

\texttt{(B) String}

\texttt{(C) if..then}

\texttt{(D) while}

Answered by qwcricket10
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