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
Deffense [45]
3 years ago
6

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. fading trailing batting Write the code segment as described above. The code segment must use an enhanced for loop to earn full credit.
Computers and Technology
1 answer:
nadezda [96]3 years ago
6 0

Answer:

 public static void main(String[] args) {

   String ing[] = {"ten","fading","post","card","thunder","hinge","trailing","batting"};

   for (String i: ing){

     if (i.endsWith("ing")){

       System.out.println(i);

    }

   }

 }

Explanation:

The for-loop cycles through the entire list and the if-statement makes it so that the string is only printed if it ends with "ing"

You might be interested in
Research and discuss the LAMP (Linux, Apache, MySQL, and PHP) architecture. What is the role of each layer of this software stac
Vsevolod [243]

Answer:

Answered below

Explanation:

LAMP is an example of a web service stack. It is used for developing dynamic websites and applications. It's components include;

1) The Linux operating system, which is built on open source and free development and distribution. Types of Linux distributions include: Ubuntu, Fedora and Debian. This operating system is where sites and applications are built on.

2) The Apache HTTP server. Apache server is developed by the Apache software Foundation and is open source. It is the most popular web server on the internet and plays a role in hosting websites.

3) MySQL is a relational database management system that plays a role in the storage of websites data and information.

4) The PHP programming language is a scripting language for web development whose commands are embedded into an HTML source code. It is a popular server-side language used for backend development.

8 0
3 years ago
What is the output of the below Java program?
patriot [66]

Answer:

If you fix your program: instead of "while (a=4)" you will have: while(a<4)

It wil print:

> 123

Explanation:

You can check the output of that kind of programs in online repl consoles e.g: https://repl.it/languages/java10

3 0
3 years ago
A robot can complete 7 tasks in hour. Each task takes the same amount of time.
bekas [8.4K]

Answer:

A. I believe is 8.57

B. Should be 7

Explanation:

Please forgive me if I'm wrong thats my best shot. However if i am right please mark brainliest

3 0
4 years ago
Read 2 more answers
When an object is instantiated, it receives its own copy of all static variables of the class?
Sloan [31]
No.

A static variable belongs to the class, not an instance of it. Therefore there only exists one copy of said variable at any given time.
8 0
3 years ago
A company Digicom Parts manufactures 2 types of unique products for laptop and desktop computers. It manufactures 10 types of la
Alisiya [41]

Algorithms are used as a prototype of an actual program, during project design.

The algorithm the manager can use to find the productID of the desktop products is as follows:

Start

i = 0

if i > N, then Exit:

  Input productID:

       If productID.upper() == 'A' or 'I' or 'E' or 'O' or 'U':

                 Process data as desktop products

  i++

Go to step 2

Stop

Note that algorithms do not conform to programming syntax.

Read more about algorithms at:

brainly.com/question/24793921

6 0
3 years ago
Other questions:
  • If you wanna buy a Monitor, please explain why you wanna buy it! PLEASE HELP ME!!!!!!!!!!!!!!!!!!!!!!!!!
    9·1 answer
  • Consider the situation you addressed in the previous question. Create numeric cost estimates for each of the costs you listed. C
    10·1 answer
  • To add text into a SmartArt graphic, a user will need to _____.
    14·1 answer
  • Does a soda vending machine Give reciepts?<br><br>need for computer science hw
    7·2 answers
  • Kylie has created some code designed to keep track of information about employees at a company. The code will be used by the com
    6·1 answer
  • Which input device uses optical technology?
    9·2 answers
  • What are the requirements to connect the Internet?<br>plz answer it.....​
    10·1 answer
  • Nadia has inserted an image into a Word document and now would like to resize the image to fit the document befter. What is the
    11·1 answer
  • Service-oriented architecture includes "reuse." Which of the following is a description of why a business finds it useful? Using
    7·1 answer
  • With _________, it is easy to target a specific geographic location. Which answer completes the blank in the sentence?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!