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
natulia [17]
3 years ago
11

array of String objects, words, has been properly declared and initialized. Each element of words contains a String consisting o

f lowercase letters (a–z). Write a code segment that uses an enhanced for loop to print all elements of words that end with "ing". As an example, if words contains {"ten", "fading", "post", "card", "thunder", "hinge", "trailing", "batting"}, then the following output should be produced by the code segment.
Computers and Technology
1 answer:
Vlad [161]3 years ago
5 0

Answer:

for(String s:words)

   if(s.endsWith("ing"))

 System.out.println(s);

Explanation:

Create an enhanced for loop that iterates through the words array

Check if an element in words ends with "ing" using endsWith() method (Since it is said that strings are lowercase letters, we do not need to check it)

If you find one that ends with "ing", print the element

You might be interested in
If you need any answer answered faster check out Wolframalpha.com
sleet_krkn [62]

Answer:

Thx

Explanation:

8 0
3 years ago
Read 2 more answers
Every time you are asked to work with others, you are being asked to:
soldier1979 [14.2K]
D. Be part of a team
3 0
4 years ago
Read 2 more answers
In the following code, what is the first line that introduces a memory leak into the program?
Fantom [35]

Answer:

The answer is "Line 13".

Explanation:

In the given code first, a header file is included for using basic function, In the next line the main method is defined in this method two-pointer variable is declared that is "numbers1 and numbers2", in which variable numbers1 holds a value that is "NULL".

  • In the next line, both variable uses malloc() function that is used to allocate memory in heap, and in this function, sizeof() function is used that print its size and also increase its value.
  • In the next step, a pointer variable numbers1 assigns a value and another variable numbers2 assigns numbers1 variable value and changes the numbers1 variable.
6 0
4 years ago
Read the section, "Junior Year." Why would someone chose to complete an apprenticeship after high school? How many occupations c
Tamiku [17]

An apprenticeship prepares you for a career through a structured program of on-the-job learning with classroom instruction, while you work and earn a salary. The programs can last from one to six years and you can choose careers in areas such as telecommunications, health care, computing, business support and the arts. The most common apprenticeships are in construction and manufacturing. If you like to work with your hands and your mind, you might want to consider an apprenticeship after high school. More than 850 occupations can be learned on the job through an apprenticeship.

7 0
3 years ago
Read 2 more answers
Heads or tails
Pani-rosa [81]

import random

heads = 0

tails = 0

i = 0

while i < 1000:

   rnd_value = random.randint(1, 2)

   if rnd_value == 1:

       heads += 1

       print("heads")

   else:

       tails += 1

       print("tails")

   i += 1

print("Heads appeared {} times and tails appeared {} times".format(heads, tails))

I hope this helps!

5 0
3 years ago
Other questions:
  • What temporarily holds programs and date while the computer is on and allows the computer to access that information randomly?
    12·1 answer
  • Different between ocular and compound miscroscope
    13·1 answer
  • Why is there more content on youtube in 4k then there is on cable, satellite, and digital tv combined?
    6·2 answers
  • Electricity was seen as a mysterious force and began to creat a stir when people called​
    13·1 answer
  • Write a program that will take a user-input number and then display all of the whole # factors for that number. For example, if
    13·1 answer
  • ___ is a family of data formats that helps people automatically receive feeds anytime there are new postings to their favorite b
    14·1 answer
  • Write a program that dynamically allocates an array large enough to hold a user-defined number of test scores. Once all the scor
    5·1 answer
  • Type the correct answer in the box. Spell the word correctly.
    15·2 answers
  • Prepare the truth table for the following boolean expressions: (A+B).(A+C).(B)
    12·1 answer
  • Explain how mobile phone production could be more sustainable​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!