answer.
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
Charra [1.4K]
2 years ago
5

How many times does the following loop execute?int upperCaseLetters = 0;String str = "abcdEfghI";boolean found = false;for (int

i = 0; i < str.length() && !found; i++){char ch = str.charAt(i);if (Character.isUpperCase(ch)){found = true;}}
Computers and Technology
1 answer:
damaskus [11]2 years ago
7 0

Answer:

Five times

Explanation:

Given the codes as follows:

  1.        int upperCaseLetters = 0;
  2.        String str = "abcdEfghI";
  3.        boolean found = false;
  4.        for (int i = 0; i < str.length() && !found; i++)
  5.        {
  6.            char ch = str.charAt(i);
  7.            if (Character.isUpperCase(ch))
  8.            {
  9.                found = true;
  10.            }
  11.        }

The for loop will stop when the first uppercase letter is found in the str. This condition is set in the for loop condition ( i < str.length() && !found)

Since the the first upper case letter is the fifth character in the given str, the for loop will run for five rounds. In the fifth round the condition in the if statement (Line 9) will be evaluated to true and then set the true value to found variable (Line 11). This will terminate the loop in the next iteration.

You might be interested in
Robin wants her presentation to move from one slide to another with special motion effects. Which option should Robin use?
topjm [15]
If this is in power point, then she should use the <em>transitions </em>tab on the ribbon. =)
3 0
2 years ago
Read 2 more answers
A DTP firm has published and printed flyers for an upcoming fundraising event. In which section of the flyer would you find the
QveST [7]
The Contact Details of the DTP firm would usually be found at the bottom of the flyer, to give way to the event to be advertised on the top and the middle of the flyer.
6 0
2 years ago
Kaira's company recently switched to a new calendaring system provided by a vendor. Kaira and other users connect to the system,
goldfiish [28.3K]

The service model that Kaira’s company is using is Saas

Explanation

Kaira’s company is using Software as a Service to access their new calendaring system that has been hosted by a 3rd party vendor over the web. It is the work of the SaaS to host specific applications and to deliver these applications to customers over the cloud. With SaaS, Kaira’s company does not need to install their calendaring software on their PCs. Every useful thing they want from their calendaring system can easily be accessed over the internet. All the company will need are personalized accounts with usernames and passwords for their employees to access.

The other different types of Cloud Computing services include;

  • PaaS: A set of tools and services designed to make coding and deploying those applications quick and efficient.
  • IaaS: hardware and software that powers it all – servers, storage, networks, and operating systems.

Learn more:

What is cloud computing?

brainly.com/question/2662575

Explain the three basic types of Cloud computing

brainly.com/question/12967175

#LearnwithBrainly

3 0
2 years ago
One subtask in the game is to roll the dice. explain why is roll the dice an abstraction.
LUCKY_DIMON [66]

Answer:

A game is built from a combination of sub-tasks in order to provide the best experience to the user and make sure that the interface is comprises of only the results of the ongoing sub-tasks to provide a higher degree of data abstraction.

Data abstraction refers to the process of representing the essential information without including the background details. Rolling a dice is preferred to be a sub-task so that the user only gets to know about the result of the roll and does not have to wait for or anticipate the result. Moreover, a game may consist of n number of sub-tasks so it is not a good idea to include them in the main framework and are preferred to be abstracted.

4 0
2 years ago
JAVA...Write a statement that calls the recursive method backwardsAlphabet() with parameter startingLetter.
scoray [572]

Answer:

RecursiveCalls.backwardsAlphabet(startingLetter);

Explanation:

The statement that is needed is a single-line statement. Since the class RecursiveCalls is already in the same file we can simply use that class and call its function without making a new class object. Once we call that class' function we simply pass the variable startingLetter (which is already provided) as the sole parameter for the function in order for it to run and use the letter 'z' as the starting point.

       RecursiveCalls.backwardsAlphabet(startingLetter);

3 0
1 year ago
Other questions:
  • In object oriented programming, what is another name for the "attributes" of an object?
    14·1 answer
  • Each of these is a basic type of a touch screen, except ________.
    10·2 answers
  • In its simplest form, communication is defined as ________.
    7·1 answer
  • Item = "quesadilla"
    7·1 answer
  • Which would be the most efficient way to store files on your computer?
    13·2 answers
  • Use the values in the range A7:A8 to extend the list of years to the range A9:A11. 3. Use AutoFill to fill the range A9:H11 with
    5·1 answer
  • Initialize the list short_names with strings 'Gus', 'Bob', and 'Zoe'. Sample output for the given program:
    9·1 answer
  • Declare a struct named PatientData that contains two integer data members named heightInches and weightPounds. Sample output for
    13·1 answer
  • Which expansion slot is used by an NVMe compliant device?
    9·1 answer
  • Create a different version of the program that: Takes a 3-digit number and generates a 6-digit number with the 3-digit number re
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!