Answer:
//method listUpper takes a list of strings as parameter
public List<String> listUpper(List<String> list)
{
List<String> finalList= new ArrayList<String>();
//finalList is created which is a list to display the strings in upper case
for(String s:list){ //loop iterates through every string in the list and converts each string to Upper case using toUpperCase() method
s = s.toUpperCase();
finalList.add(s); } //finally the upper case strings are added to the finalList
return finalList; } //return the final list with uppercase strings
Explanation:
The method listUpper() works as follows:
For example we have a list of following strings: ("a", "an", "being").
finalList is a list created which will contains the above strings after converting them to uppercase letters.
For loop moves through each string in the list with these strings ("a", "an", "being"). At each iteration it converts each string in the list to uppercase using toUpperCase() and then add the string after converting to uppercase form to the finalList using add() method. So at first iteration "a" is converted to A and added to finalList, then "an" is converted to uppercase AN and added to finalList and at last iteration "being" is converted to BEING and added to finalList. At the end return statement returns the finalList which now contains all the string from list in uppercase form.
Answer:
The answer is "Option B, C, and F".
Explanation:
In the For-each loop, it is used for traversing items in a sequence is the control flow expression. It typically required a loop becomes referred to it as an enhanced loop for iterating its array as well as the collection elements. This loop is a version shortcut that skips the need for the hasNext() method to get iterator and the loop and over an iterator, and the incorrect choice can be determined as follows:
- In choice A, it is wrong because it can't reverse the array element.
- In choice D, it is wrong because it can't determine the array of positive.
- In choice E, it is wrong because it can't determine an array of the sting in alphabetical order.
The baseline satellite<span> constellation consists of 24 </span>satellites<span> positioned in six </span>earth-centered orbital planes with four operation satellites<span> and a spare </span>satellite<span> slot in each orbital plane.</span>