1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vovikov84 [41]
3 years ago
9

Write a method called listUpper() that takes in a list of strings, and returns a list of the same length containing the same str

ings but in all uppercase form. You can either modify the provided list or create a new one.Examples:listUpper(list("a", "an", "being")) -> list("A", "AN", "BEING")listUpper(list("every", "gator", "eats")) -> list("EVERY", "GATOR", "EATS")listUpper(list()) -> list()In this format:public List listUpper(List list){}
Computers and Technology
1 answer:
pav-90 [236]3 years ago
3 0

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.

You might be interested in
The default ____ for a hyperlink is the folder location and the name of the file to which you will link.
ycow [4]
Title is used
hope it helps
6 0
4 years ago
________ is a programming language invented by netscape used to control the objects on an html page and handle interactions with
spayn [35]
The answer is JavaScript
5 0
3 years ago
What two factors make up the skills of a good typist
Vikki [24]

Answer:

I feel to be a good typist one would have to have a good grasp of reading, grammar, and the ability to make errors to a lesser degree than more so. I can type, myself, 120-150 wpm with an error rate of 0-2. I also have the ability of not having to look at the keyboard as I type, and have a good eye on catching errors.

Explanation:

5 0
3 years ago
Alice just wrote a new app using Python. She tested her code and noticed some of her lines of code are out of order. Which princ
kaheart [24]

Answer:

Sequencing

Explanation:

I have taken the test

5 0
3 years ago
Margie has found a stock template to use. She changes a few things about the formatting and then saves the
asambeis [7]

Answer:

file open my documents

Explanation:

because if she saved it she would have to go to her documents to open it

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which is true about POP3 and IMAP for incoming email?
    6·1 answer
  • One suggested means of gaining eye contact before reversing is to:____.
    12·1 answer
  • "The study of how changes in the input parameters of a linear programming problem affect the optimal solution is known as
    8·1 answer
  • What would be the results of the following code? final int SIZE = 25; int[] array1 = new int[SIZE]; … // Code that will put valu
    9·1 answer
  • Briefly describe the interface between the memory and the processing unit. That is, describe the method by which the memory and
    6·1 answer
  • How does is make you feel when you're kind to others? What are some opportunities in your life to be more kind to your friends a
    9·1 answer
  • What line of code makes the character pointer studentPointer point to the character variable userStudent?char userStudent = 'S';
    5·1 answer
  • Match the title of the work of fiction to the description given.
    8·1 answer
  • The _____ Tag surrounds all content that will be visible on your web page for all to users to see on that website.
    13·1 answer
  • What is a shortcut for adding a timeline marker
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!